Contents Functions Classes Topics User Forum CVS

G3D::NetMessage Class Reference

#include <NetworkDevice.h>

List of all members.

Public Member Functions

virtual ~NetMessage ()
virtual uint32 type () const =0
virtual void serialize (class BinaryOutput &b) const =0
virtual void deserialize (class BinaryInput &b)=0


Detailed Description

Interface for data sent through a conduit. NetMessages automatically serialize and deserialize themselves when sent through ReliableConduit and LightweightConduit. An application contains many subclasses of NetMessage, one for each kind of message (e.g. SignOnMessage, CreatePlayer, ChatMessage, PlaySoundMessage, SignOffMessage). Because the specific messages needed depend on the application, they are not part of G3D.

Deprecated:
Send and receive methods now directly accept serializable objects.


Constructor & Destructor Documentation

virtual G3D::NetMessage::~NetMessage  )  [inline, virtual]
 


Member Function Documentation

virtual void G3D::NetMessage::deserialize class BinaryInput b  )  [pure virtual]
 

virtual void G3D::NetMessage::serialize class BinaryOutput b  )  const [pure virtual]
 

virtual uint32 G3D::NetMessage::type  )  const [pure virtual]
 

This must return a value even for an uninitalized instance. Create an enumeration for your message types and return one of those values. It will be checked on both send and receive as a form of runtime type checking.

Values less than 1000 are reserved for the system.


The documentation for this class was generated from the following file:
Generated on Mon Jul 17 11:50:46 2006 for G3D by doxygen 1.4.5
Hosted by SourceForge.net Logo