]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/WebServer/Exit.c
5 Copyright (c) 2011-2012, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <WebServer.h>
20 Respond with the Exit page
22 @param [in] SocketFD The socket's file descriptor to add to the list.
23 @param [in] pPort The WSDT_PORT structure address
24 @param [out] pbDone Address to receive the request completion status
26 @retval EFI_SUCCESS The request was successfully processed
41 // Send the Hello World page
45 // Tell the web-server to exit
47 mWebServer
.bRunning
= FALSE
;
50 // Send the page header
52 Status
= HttpPageHeader ( SocketFD
, pPort
, L
"Exit" );
53 if ( EFI_ERROR ( Status
)) {
60 Status
= HttpSendAnsiString ( SocketFD
,
64 " Exiting the web-server application.\r\n"
66 if ( EFI_ERROR ( Status
)) {
71 // Send the page trailer
73 Status
= HttpPageTrailer ( SocketFD
, pPort
, pbDone
);
78 // Return the operation status
80 DBG_EXIT_STATUS ( Status
);