void SetTimeout(const long t)
Set the timeout used for waiting to t.
virtual GPL_Boolean Initialize(void)
Initialize the server. This must be called before the first call to
Wait(), Request(), or Reply().
virtual void Finalize(void)
Finalize the server.
void SetSource(DNA_IPPoint *s)
Set the address of this server to s.
void SetImp(DNA_UDPBindingImp *i)
Set the implementation used to i. The default implementation is an
instance of DNA_TCPConnectionImp.
virtual void Wait(void)
Wait for any new connections on the listening socket or any messages on
previously-accepted sockets. ProcessMessage() is called for each
message that is received.
virtual void ProcessMessage(DNA_Message & message, const GPL_OPAQUE key)
Process the message message that was received from the connection
identified by key. By default, this does nothing. Sub-classes
that wish to perform additional processing should over-ride this
function.
virtual void AcceptGoodConnection(const GPL_OPAQUE key)
Accept a good connection identified by key. By default, this does
nothing. Sub-classes that wish to perform additional processing should
over-ride this function.
virtual void DropBadConnection(const GPL_OPAQUE key)
Drop a bad connection identified by key. By default, this causes
this connection to be disconnected, closed, and removed from the
connection list. Sub-classes that wish to perform additional
processing should over-ride this function.
GPL_Boolean Request(DNA_Message & message, const GPL_OPAQUE key)
Send the request message to the client on the connection identified
by key. Return TRUE if the send succeeds and FALSE if
it fails.
GPL_Boolean Reply(DNA_Message & message, const GPL_OPAQUE key)
Send the reply message to the client on the connection identified
by key. Return TRUE if the send succeeds and FALSE if
it fails.
void Reject(const GPL_OPAQUE key)
Reject the connection identified by key. This causes this
connection to be disconnected, closed, and removed from the connection
list.