Public Member Functions

kNet::IMessageHandler Class Reference

IMessageHandler is a callback object used by the MessageConnection to invoke the main application whenever a message has been received. More...

#include <IMessageHandler.h>

List of all members.

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.

Detailed Description

IMessageHandler is a callback object used by the MessageConnection to invoke the main application whenever a message has been received.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines