DServer accepts TCP connections and generates an event for each one. Details on event handling can be found in the Event Handling section. See Simple Server for sample DServer code.
The constructor registers this DServer with the given engine.
Binds the server to the specified portNumber. ipVersion should be set to either DA_IPV4 or DA_IPV6. This function returns false if it couldn't bind the socket, and sets errMsg with a description of the problem.
Closes the listen socket.
Returns a description of the most recent error.
Set an event handler that will be called whenever an error occurs. The errorHandler function will be given a human-readable description of the problem.
Start listening for connections. connectHandler will be called whenever a new client connects. socket can be used to construct a DClient, which will handle the connection. If you prefer to use socket directly, you are responsible for deleting it when finished. Returns false on errors and sets errMsg.