DServer accepts TCP connections and generates an event for each one. DServer is an abstract class, and should be inherited by a child that implements its event handlers. 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.
Start listening for connections. connectHandler will be called whenever a client connects. Returns false on errors and sets errMsg.
This event handler is called when a 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.
An event handler that's called when there's an error accepting connections. errorDesc contains a description of the problem.