TDME2 1.9.121
|
Network server client request handler hub. More...
#include <tdme/network/udpserver/ServerClientRequestHandlerHub.h>
Public Member Functions | |
ServerClientRequestHandlerHub () | |
Public constructor. More... | |
virtual | ~ServerClientRequestHandlerHub () |
Public destructor. More... | |
void | addHandler (ServerClientRequestHandler< CLIENT, REQUEST > *handler) |
Adds a client request handler. More... | |
void | setDefaultHandler (ServerClientRequestHandler< CLIENT, REQUEST > *handler) |
Sets the client request default handler, will be used if command not found in request handler map. More... | |
void | handleRequest (CLIENT *client, const string &command, REQUEST &request, const uint32_t messageId, const uint8_t retries) |
Handles a client request. More... | |
Private Types | |
typedef map< string, ServerClientRequestHandler< CLIENT, REQUEST > * > | RequestHandlerMap |
Private Attributes | |
RequestHandlerMap | requestHandlerMap |
ServerClientRequestHandler< CLIENT, REQUEST > * | defaultHandler |
Network server client request handler hub.
Definition at line 25 of file ServerClientRequestHandlerHub.h.
|
private |
Definition at line 93 of file ServerClientRequestHandlerHub.h.
|
inline |
Public constructor.
Definition at line 30 of file ServerClientRequestHandlerHub.h.
|
inlinevirtual |
Public destructor.
Definition at line 36 of file ServerClientRequestHandlerHub.h.
|
inline |
Adds a client request handler.
handler | request handler |
TCPServerClientRequestHandlerHubException |
Definition at line 50 of file ServerClientRequestHandlerHub.h.
|
inline |
Handles a client request.
client | client |
command | command |
request | request |
messageId | message id (udp server only) |
retries | retries (udp server only) |
Definition at line 75 of file ServerClientRequestHandlerHub.h.
|
inline |
Sets the client request default handler, will be used if command not found in request handler map.
handler | request handler |
Definition at line 63 of file ServerClientRequestHandlerHub.h.
|
private |
Definition at line 95 of file ServerClientRequestHandlerHub.h.
|
private |
Definition at line 94 of file ServerClientRequestHandlerHub.h.