Base class for the main loop of the ZIA server.
More...
#include <IServer.h>
Base class for the main loop of the ZIA server.
Base class that englobes all types of modules, including the execution of the IExecutionLine.
| virtual int ApiNewYear::IServer::attach |
( |
IConnection * |
connection | ) |
|
|
pure virtual |
Adds connection module.
IServer adds modules to container of connection modules to be executed after server is initialized, after fork, and while a client is trying to connect.
- Parameters
-
| connection | Event containing information for the module to run. |
- Returns
- an int representing success or error code.
| virtual int ApiNewYear::IServer::detach |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Remvoes connection module.
IServer Removes the module by name from container of connection modules to be executed.
- Parameters
-
| name | string containing the name of the module to look for. |
- Returns
- an int representing success or error code.
Getter for ExecutionLine.
IServer gets the ExectuionLine.
- Returns
- a reference to the ExecutionLine.
| virtual int ApiNewYear::IServer::init |
( |
IExecutionLine & |
executionLine | ) |
|
|
pure virtual |
Initializes IServer.
IServer initializes IServer by giving access to IExecutionLine, for future run, and initializing the servers socket.
- Parameters
-
| executionLine | executionLine containing attached modules. |
- Returns
- int representing success or error code.
| virtual int ApiNewYear::IServer::run |
( |
void |
| ) |
|
|
pure virtual |
Runs the main loop for the ZIA modules.
IServer Awaits for a client to try and connect, creates a child process, allocates an IHttpClient to be used by the ExecutionLine, executes connection modules, and then loops the ExectuionLine. When ExecutionLine has finished (client has disconnected, or timed out), deletes IHttpClient.
- Returns
- an int representing success or error code.
The documentation for this class was generated from the following file: