Web server based weather station using Sparkfun Weather Meters.
Dependencies: FatFileSystem mbed WeatherMeters SDFileSystem
CHTTPServer Class Reference
HTTP server class. More...
#include <HTTPServer.h>
Public Member Functions | |
CHTTPServer () | |
Constructor. | |
int | AttachRequestHandler (IHTTPRequestHandler *pHandler) |
Attach IRequestHandler to the HTTP server to allow application to add custom GET/HEAD/POST handling. | |
int | Bind (const char *pRootPathname, const char *pServerName="lwIP_HTTPServer/1.0", unsigned short BindPort=80) |
Initializes the HTTP server object by binding it to to the specified port number. |
Detailed Description
HTTP server class.
Definition at line 302 of file HTTPServer.h.
Constructor & Destructor Documentation
CHTTPServer | ( | ) |
Constructor.
Definition at line 1889 of file HTTPServer.cpp.
Member Function Documentation
int AttachRequestHandler | ( | IHTTPRequestHandler * | pHandler ) |
Attach IRequestHandler to the HTTP server to allow application to add custom GET/HEAD/POST handling.
- Parameters:
-
pHandler is a pointer to the application specific request handler object to be used by the HTTP server when it receives GET/POST requests.
- Returns:
- 0 on successful attachment and a positive value otherwise.
Definition at line 1912 of file HTTPServer.cpp.
int Bind | ( | const char * | pRootPathname, |
const char * | pServerName = "lwIP_HTTPServer/1.0" , |
||
unsigned short | BindPort = 80 |
||
) |
Initializes the HTTP server object by binding it to to the specified port number.
- Parameters:
-
pRootPathame is the pathname of the default root directory from which the HTTP GET requests are satisfied. pServerName is the name of the server to be returned to the HTTP client in the Server header. BindPort is the TCP/IP port to which the HTTP server should listen for incoming requests. The default port for HTTP would be 80.
- Returns:
- 0 on success and a positive value otherwise.
Definition at line 1937 of file HTTPServer.cpp.
Generated on Tue Jul 12 2022 20:48:16 by 1.7.2