PacketLogger Class Reference
[PacketLogger]

Writes incoming and outgoing messages to the screen. This will write all incoming and outgoing messages to the console window, or to a file if you override it and give it this functionality. More...

#include <PacketLogger.h>

Inheritance diagram for PacketLogger:

PluginInterface PacketConsoleLogger PacketFileLogger List of all members.

Public Member Functions

virtual void OnAttach (RakPeerInterface *peer)
virtual void OnDirectSocketSend (const char *data, const unsigned bitsUsed, PlayerID remoteSystemID)
 Events on low level sends and receives. These functions may be called from different threads at the same time.
virtual void OnDirectSocketReceive (const char *data, const unsigned bitsUsed, PlayerID remoteSystemID)
virtual void OnInternalPacket (InternalPacket *internalPacket, unsigned frameNumber, PlayerID remoteSystemID, RakNetTime time, bool isSend)
virtual void LogHeader (void)
 Logs out a header for all the data.
virtual void WriteLog (const char *str)
 Override this to log strings to wherever. Log should be threadsafe.
virtual void SetPrintID (bool print)
virtual void SetPrintAcks (bool print)

Protected Member Functions

char * IDTOString (unsigned char Id)
char * BaseIDTOString (unsigned char Id)
virtual char * UserIDTOString (unsigned char Id)

Protected Attributes

RakPeerInterfacerakPeer
bool printId
bool printAcks

Detailed Description

Writes incoming and outgoing messages to the screen. This will write all incoming and outgoing messages to the console window, or to a file if you override it and give it this functionality.


Member Function Documentation

void PacketLogger::OnAttach RakPeerInterface peer  )  [virtual]
 

Called when the interface is attached

Parameters:
[in] peer the instance of RakPeer that is calling Receive

Reimplemented from PluginInterface.

Reimplemented in PacketFileLogger.

void PacketLogger::OnDirectSocketReceive const char *  data,
const unsigned  bitsUsed,
PlayerID  remoteSystemID
[virtual]
 

Called on a receive from the socket, per datagram, that does not go through the reliability layer

Parameters:
[in] data The data being sent
[in] bitsUsed How many bits long data is
[in] remoteSystemID Which system this message is being sent to

Reimplemented from PluginInterface.

void PacketLogger::OnInternalPacket InternalPacket internalPacket,
unsigned  frameNumber,
PlayerID  remoteSystemID,
RakNetTime  time,
bool  isSend
[virtual]
 

Called on a send or recieve within the reliability layer

Parameters:
[in] internalPacket The user message, along with all send data.
[in] frameNumber The number of frames sent or received so far for this player depending on isSend . Indicates the frame of this user message.
[in] remoteSystemID The player we sent or got this packet from
[in] time The current time as returned by RakNet::GetTime()
[in] isSend Is this callback representing a send event or receive event?

Reimplemented from PluginInterface.


The documentation for this class was generated from the following files:
Generated on Sat Oct 14 08:37:38 2006 for RakNet by  doxygen 1.4.6-NO