gmlNetworkMessageManager Class Reference

Inherits from

Detailed Description

Objects that manage packing outgoing message and unpacking incoming messages, using a TCP or UDP socket. Creation and disposal of the socket is left to the client.

After creation, instances generate the following events:

Receive pid mid size data
once for each message received; pid if the peer identifier, mid is the message index, size is the number of bytes, and data is the message contents.
Disconnect
when the end of stream is encountered.
Error
whenever a protocol error is detected.

Public Member Functions

constructor peerID channel

Instances should be build immediately after the socket channel has been created, either with socket or upon accept.

destructor

send mid data

Send a message with identifier mid containing the data, followed by CRLF.