|
Create a server instance, listening on the given port for client connections. A server callback function must be suplied that will handle every and each client request. A server threading model maybe specified either as multi-threaded (one thread per client) or single thread multiplex mode (one thread serves all clients).
- Parameters:
-
| iPort | Port number where the server will bind for listening. |
| pfnCallback | Callback function to receive and handle client requests. |
| pvData | Server context opaque data, that will be passed to the callback function without change. |
| mode | Server mode of operation, regarding the internal threading model, either LSCP_SERVER_THREAD for a multi-threaded server, or LSCP_SERVER_SELECT for a single-threaded multiplexed server. |
- Returns:
- The new server instance pointer if successfull, which shall be used on all subsequent server calls, NULL otherwise.
|