|
| AbstractThreadedServer (size_t threads) |
|
virtual bool | StartListening () |
| This method should signal the Connector to start waiting for requests, in any way that is appropriate for the derived connector class. More...
|
|
virtual bool | StopListening () |
| This method should signal the Connector to stop waiting for requests, in any way that is appropriate for the derived connector class. More...
|
|
void | ProcessRequest (const std::string &request, std::string &response) |
|
void | SetHandler (IClientConnectionHandler *handler) |
|
IClientConnectionHandler * | GetHandler () |
|
|
bool | running |
|
std::unique_ptr< std::thread > | listenerThread |
|
ThreadPool | threadPool |
|
size_t | threads |
|
Definition at line 10 of file abstractthreadedserver.h.
◆ CheckForConnection()
virtual int CheckForConnection |
( |
| ) |
|
|
protectedpure virtual |
CheckForConnection should poll for a new connection.
This must be a non-blocking call.
- Returns
- a handle which is passed on to HandleConnection()
◆ HandleConnection()
virtual void HandleConnection |
( |
int |
connection | ) |
|
|
protectedpure virtual |
HandleConnection must handle connection information for a given handle that has been returned by CheckForConnection()
- Parameters
-
◆ InitializeListener()
virtual bool InitializeListener |
( |
| ) |
|
|
protectedpure virtual |
InitializeListener should initialize sockets, file descriptors etc.
- Returns
◆ StartListening()
virtual bool StartListening |
( |
| ) |
|
|
virtual |
This method should signal the Connector to start waiting for requests, in any way that is appropriate for the derived connector class.
If something went wrong, this method should return false, otherwise true.
Implements AbstractServerConnector.
◆ StopListening()
virtual bool StopListening |
( |
| ) |
|
|
virtual |
This method should signal the Connector to stop waiting for requests, in any way that is appropriate for the derived connector class.
If something went wrong, this method should return false, otherwise true.
Implements AbstractServerConnector.