]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Sockets/WebServer/Hello.c
3 Hello World response page
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 Hello World 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 // Send the page header
47 Status
= HttpPageHeader ( SocketFD
, pPort
, L
"Hello World" );
48 if ( EFI_ERROR ( Status
)) {
55 Status
= HttpSendAnsiString ( SocketFD
,
57 "<h1>Hello World</h1>\r\n"
59 " This response was generated by the UEFI web server application.\r\n"
61 if ( EFI_ERROR ( Status
)) {
66 // Send the page trailer
68 Status
= HttpPageTrailer ( SocketFD
, pPort
, pbDone
);
73 // Return the operation status
75 DBG_EXIT_STATUS ( Status
);