|
| NPT_HttpServer (NPT_UInt16 listen_port=NPT_HTTP_DEFAULT_PORT, bool cancellable=false) |
|
| NPT_HttpServer (NPT_IpAddress listen_address, NPT_UInt16 listen_port=NPT_HTTP_DEFAULT_PORT, bool cancellable=false) |
|
NPT_Result | SetConfig (const Config &config) |
|
const Config & | GetConfig () const |
|
NPT_Result | SetListenPort (NPT_UInt16 port, bool reuse_address=true) |
|
NPT_Result | SetTimeouts (NPT_Timeout connection_timeout, NPT_Timeout io_timeout) |
|
NPT_Result | SetServerHeader (const char *server_header) |
|
NPT_Result | Abort () |
|
NPT_Result | WaitForNewClient (NPT_InputStreamReference &input, NPT_OutputStreamReference &output, NPT_HttpRequestContext *context, NPT_Flags socket_flags=0) |
|
NPT_Result | Loop (bool cancellable_sockets=true) |
|
NPT_UInt16 | GetPort () |
|
void | Terminate () |
|
virtual NPT_Result | AddRequestHandler (NPT_HttpRequestHandler *handler, const char *path, bool include_children=false, bool transfer_ownership=false) |
| Add a request handler. More...
|
|
virtual NPT_HttpRequestHandler * | FindRequestHandler (NPT_HttpRequest &request) |
|
virtual NPT_List< NPT_HttpRequestHandler * > | FindRequestHandlers (NPT_HttpRequest &request) |
|
virtual NPT_Result | RespondToClient (NPT_InputStreamReference &input, NPT_OutputStreamReference &output, const NPT_HttpRequestContext &context) |
| Parse the request from a new client, form a response, and send it back.
|
|
◆ AddRequestHandler()
NPT_Result NPT_HttpServer::AddRequestHandler |
( |
NPT_HttpRequestHandler * |
handler, |
|
|
const char * |
path, |
|
|
bool |
include_children = false , |
|
|
bool |
transfer_ownership = false |
|
) |
| |
|
virtual |
Add a request handler.
By default the ownership of the handler is NOT transfered to this object, so the caller is responsible for the lifetime management of the handler object.
The documentation for this class was generated from the following files:
- lib/libUPnP/Neptune/Source/Core/NptHttp.h
- lib/libUPnP/Neptune/Source/Core/NptHttp.cpp