IMessageHandler is a callback object used by the MessageConnection to invoke the main application whenever a message has been received. More...
#include <IMessageHandler.h>
Public Member Functions | |
| virtual void | HandleMessage (MessageConnection *source, message_id_t id, const char *data, size_t numBytes)=0 |
| Called whenever the network stack has received a message that the application needs to process. | |
| virtual u32 | ComputeContentID (message_id_t id, const char *data, size_t numBytes) |
| Called by the network library to ask the application to produce a content ID associated with the given message. | |
IMessageHandler is a callback object used by the MessageConnection to invoke the main application whenever a message has been received.
| virtual void kNet::IMessageHandler::HandleMessage | ( | MessageConnection * | source, | |
| message_id_t | id, | |||
| const char * | data, | |||
| size_t | numBytes | |||
| ) | [pure virtual] |
Called whenever the network stack has received a message that the application needs to process.
Referenced by kNet::MessageConnection::Process().
| virtual u32 kNet::IMessageHandler::ComputeContentID | ( | message_id_t | id, | |
| const char * | data, | |||
| size_t | numBytes | |||
| ) | [inline, virtual] |
Called by the network library to ask the application to produce a content ID associated with the given message.
If the application returns 0, the message doesn't have a ContentID and it is processed normally. The ContentID of the message is used to determine if a message replaces another.
1.7.1