Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HTTPServer Class Reference
A simple HTTP server implementation. More...
#include <HTTPServer.h>
Public Member Functions | |
| HTTPServer () | |
| Instantiates the HTTP Server. | |
| template<typename T > | |
| void | addHandler (const char *path) |
| Adds a handler. | |
| void | bind (int port=80) |
| Starts listening. | |
| HTTPServer () | |
| Instantiates the HTTP Server. | |
| template<typename T > | |
| void | addHandler (const char *path) |
| Adds a handler. | |
| void | bind (int port=80) |
| Starts listening. | |
Detailed Description
A simple HTTP server implementation.
The HTTPServer is composed of:
- The actual server (HTTPServer)
- A request dispatcher, instanciated on each request (HTTPRequestDispatcher)
- Request handlers instanciated by the dispatcher(deriving from HTTPRequestHandler)
Definition at line 51 of file LPC1768/services/http/server/HTTPServer.h.
Constructor & Destructor Documentation
| HTTPServer | ( | ) |
Instantiates the HTTP Server.
| HTTPServer | ( | ) |
Instantiates the HTTP Server.
Member Function Documentation
| void addHandler | ( | const char * | path ) |
Adds a handler.
Appends a handler to the handlers list
- Parameters:
-
T : class which will be instanciated to serve these requests path : requests starting with this path will be served using this handler
Definition at line 79 of file LPC1768/services/http/server/HTTPServer.h.
| void addHandler | ( | const char * | path ) |
Adds a handler.
Appends a handler to the handlers list
- Parameters:
-
T : class which will be instanciated to serve these requests path : requests starting with this path will be served using this handler
Definition at line 79 of file LPC2368/services/http/server/HTTPServer.h.
| void bind | ( | int | port = 80 ) |
Starts listening.
Binds server to a specific port and starts listening
- Parameters:
-
port : port on which to listen for incoming connections
| void bind | ( | int | port = 80 ) |
Starts listening.
Binds server to a specific port and starts listening
- Parameters:
-
port : port on which to listen for incoming connections
Generated on Tue Jul 12 2022 13:41:31 by
1.7.2