Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
NetPacket Class Reference

#include <NetPacket.h>

Inherits MemoryPoolObject.

Public Member Functions

 NetPacket ()
 
 NetPacket (TransportMessage *msg)
 
void init ()
 
void reset ()
 
void setAddress (Int addr, Int port)
 
Bool addCommand (NetCommandRef *msg)
 
Int getNumCommands ()
 
NetCommandListgetCommandList ()
 
UnsignedBytegetData ()
 
Int getLength ()
 
UnsignedInt getAddr ()
 
UnsignedShort getPort ()
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 

Static Public Member Functions

static NetCommandRefConstructNetCommandMsgFromRawData (UnsignedByte *data, UnsignedShort dataLength)
 
static NetPacketList ConstructBigCommandPacketList (NetCommandRef *ref)
 

Protected Member Functions

Bool addFrameCommand (NetCommandRef *msg)
 
Bool isRoomForFrameMessage (NetCommandRef *msg)
 
Bool addAckCommand (NetCommandRef *msg, UnsignedShort commandID, UnsignedByte originalPlayerID)
 
Bool addAckStage1Command (NetCommandRef *msg)
 
Bool addAckStage2Command (NetCommandRef *msg)
 
Bool addAckBothCommand (NetCommandRef *msg)
 
Bool isRoomForAckMessage (NetCommandRef *msg)
 
Bool addGameCommand (NetCommandRef *msg)
 
Bool isRoomForGameMessage (NetCommandRef *msg, GameMessage *gmsg)
 
Bool addPlayerLeaveCommand (NetCommandRef *msg)
 
Bool isRoomForPlayerLeaveMessage (NetCommandRef *msg)
 
Bool addRunAheadMetricsCommand (NetCommandRef *msg)
 
Bool isRoomForRunAheadMetricsMessage (NetCommandRef *msg)
 
Bool addRunAheadCommand (NetCommandRef *msg)
 
Bool isRoomForRunAheadMessage (NetCommandRef *msg)
 
Bool addDestroyPlayerCommand (NetCommandRef *msg)
 
Bool isRoomForDestroyPlayerMessage (NetCommandRef *msg)
 
Bool addKeepAliveCommand (NetCommandRef *msg)
 
Bool isRoomForKeepAliveMessage (NetCommandRef *msg)
 
Bool addDisconnectKeepAliveCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectKeepAliveMessage (NetCommandRef *msg)
 
Bool addDisconnectPlayerCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectPlayerMessage (NetCommandRef *msg)
 
Bool addPacketRouterQueryCommand (NetCommandRef *msg)
 
Bool isRoomForPacketRouterQueryMessage (NetCommandRef *msg)
 
Bool addPacketRouterAckCommand (NetCommandRef *msg)
 
Bool isRoomForPacketRouterAckMessage (NetCommandRef *msg)
 
Bool addDisconnectChatCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectChatMessage (NetCommandRef *msg)
 
Bool addChatCommand (NetCommandRef *msg)
 
Bool isRoomForChatMessage (NetCommandRef *msg)
 
Bool addDisconnectVoteCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectVoteMessage (NetCommandRef *msg)
 
Bool addProgressMessage (NetCommandRef *msg)
 
Bool isRoomForProgressMessage (NetCommandRef *msg)
 
Bool addLoadCompleteMessage (NetCommandRef *msg)
 
Bool isRoomForLoadCompleteMessage (NetCommandRef *msg)
 
Bool addTimeOutGameStartMessage (NetCommandRef *msg)
 
Bool isRoomForTimeOutGameStartMessage (NetCommandRef *msg)
 
Bool addWrapperCommand (NetCommandRef *msg)
 
Bool isRoomForWrapperMessage (NetCommandRef *msg)
 
Bool addFileCommand (NetCommandRef *msg)
 
Bool isRoomForFileMessage (NetCommandRef *msg)
 
Bool addFileAnnounceCommand (NetCommandRef *msg)
 
Bool isRoomForFileAnnounceMessage (NetCommandRef *msg)
 
Bool addFileProgressCommand (NetCommandRef *msg)
 
Bool isRoomForFileProgressMessage (NetCommandRef *msg)
 
Bool addDisconnectFrameCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectFrameMessage (NetCommandRef *msg)
 
Bool addDisconnectScreenOffCommand (NetCommandRef *msg)
 
Bool isRoomForDisconnectScreenOffMessage (NetCommandRef *msg)
 
Bool addFrameResendRequestCommand (NetCommandRef *msg)
 
Bool isRoomForFrameResendRequestMessage (NetCommandRef *msg)
 
Bool isAckRepeat (NetCommandRef *msg)
 
Bool isAckBothRepeat (NetCommandRef *msg)
 
Bool isAckStage1Repeat (NetCommandRef *msg)
 
Bool isAckStage2Repeat (NetCommandRef *msg)
 
Bool isFrameRepeat (NetCommandRef *msg)
 
void writeGameMessageArgumentToPacket (GameMessageArgumentDataType type, GameMessageArgumentType arg)
 
void dumpPacketToLog ()
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Static Protected Member Functions

static UnsignedInt GetBufferSizeNeededForCommand (NetCommandMsg *msg)
 
static void FillBufferWithCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static UnsignedInt GetGameCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetAckCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetFrameCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetPlayerLeaveCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetRunAheadMetricsCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetRunAheadCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDestroyPlayerCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetKeepAliveCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectKeepAliveCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectPlayerCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetPacketRouterQueryCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetPacketRouterAckCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectChatCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectVoteCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetChatCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetProgressMessageSize (NetCommandMsg *msg)
 
static UnsignedInt GetLoadCompleteMessageSize (NetCommandMsg *msg)
 
static UnsignedInt GetTimeOutGameStartMessageSize (NetCommandMsg *msg)
 
static UnsignedInt GetWrapperCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetFileCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetFileAnnounceCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetFileProgressCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectFrameCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetDisconnectScreenOffCommandSize (NetCommandMsg *msg)
 
static UnsignedInt GetFrameResendRequestCommandSize (NetCommandMsg *msg)
 
static void FillBufferWithGameCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithAckCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithFrameCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithPlayerLeaveCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithRunAheadMetricsCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithRunAheadCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDestroyPlayerCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithKeepAliveCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectKeepAliveCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectPlayerCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithPacketRouterQueryCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithPacketRouterAckCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectChatCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectVoteCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithChatCommand (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithProgressMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithLoadCompleteMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithTimeOutGameStartMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithFileMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithFileProgressMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithFileAnnounceMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectFrameMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithDisconnectScreenOffMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static void FillBufferWithFrameResendRequestMessage (UnsignedByte *buffer, NetCommandRef *msg)
 
static NetCommandMsgreadGameMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadAckBothMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadAckStage1Message (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadAckStage2Message (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadFrameMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadPlayerLeaveMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadRunAheadMetricsMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadRunAheadMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDestroyPlayerMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadKeepAliveMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectKeepAliveMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectPlayerMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadPacketRouterQueryMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadPacketRouterAckMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectChatMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectVoteMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadChatMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadProgressMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadLoadCompleteMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadTimeOutGameStartMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadWrapperMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadFileMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadFileAnnounceMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadFileProgressMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectFrameMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadDisconnectScreenOffMessage (UnsignedByte *data, Int &i)
 
static NetCommandMsgreadFrameResendRequestMessage (UnsignedByte *data, Int &i)
 
static void readGameMessageArgumentFromPacket (GameMessageArgumentDataType type, NetGameCommandMsg *msg, UnsignedByte *data, Int &i)
 

Protected Attributes

UnsignedByte m_packet [MAX_PACKET_SIZE]
 
Int m_packetLen
 
UnsignedInt m_addr
 
Int m_numCommands
 
NetCommandRefm_lastCommand
 
UnsignedInt m_lastFrame
 
UnsignedShort m_port
 
UnsignedShort m_lastCommandID
 
UnsignedByte m_lastPlayerID
 
UnsignedByte m_lastCommandType
 
UnsignedByte m_lastRelay
 

Detailed Description

Definition at line 52 of file NetPacket.h.

Constructor & Destructor Documentation

◆ NetPacket() [1/2]

NetPacket::NetPacket ( )

Constructor

Definition at line 1903 of file NetPacket.cpp.

◆ NetPacket() [2/2]

NetPacket::NetPacket ( TransportMessage * msg)

Constructor given raw transport data.

Definition at line 1910 of file NetPacket.cpp.

Member Function Documentation

◆ addAckBothCommand()

Bool NetPacket::addAckBothCommand ( NetCommandRef * msg)
protected

Add an ack "both" command.

Definition at line 4521 of file NetPacket.cpp.

◆ addAckCommand()

Bool NetPacket::addAckCommand ( NetCommandRef * msg,
UnsignedShort commandID,
UnsignedByte originalPlayerID )
protected

Add this ack command to the packet. Returns true if successful.

Definition at line 4545 of file NetPacket.cpp.

◆ addAckStage1Command()

Bool NetPacket::addAckStage1Command ( NetCommandRef * msg)
protected

Add an ack stage 1 command.

Definition at line 4529 of file NetPacket.cpp.

◆ addAckStage2Command()

Bool NetPacket::addAckStage2Command ( NetCommandRef * msg)
protected

Add an ack stage 2 command.

Definition at line 4537 of file NetPacket.cpp.

◆ addChatCommand()

Bool NetPacket::addChatCommand ( NetCommandRef * msg)
protected

Definition at line 3313 of file NetPacket.cpp.

◆ addCommand()

Bool NetPacket::addCommand ( NetCommandRef * msg)

Adds this command to the packet. Returns false if there wasn't enough room in the packet for this message, true otherwise.

Definition at line 1968 of file NetPacket.cpp.

◆ addDestroyPlayerCommand()

Bool NetPacket::addDestroyPlayerCommand ( NetCommandRef * msg)
protected

Add a DestroyPlayer command to the packet. Returns true if successful.

Definition at line 4005 of file NetPacket.cpp.

◆ addDisconnectChatCommand()

Bool NetPacket::addDisconnectChatCommand ( NetCommandRef * msg)
protected

Definition at line 3222 of file NetPacket.cpp.

◆ addDisconnectFrameCommand()

Bool NetPacket::addDisconnectFrameCommand ( NetCommandRef * msg)
protected

Definition at line 2272 of file NetPacket.cpp.

◆ addDisconnectKeepAliveCommand()

Bool NetPacket::addDisconnectKeepAliveCommand ( NetCommandRef * msg)
protected

Add a keep alive command to the packet. Returns true if successful.

Definition at line 3719 of file NetPacket.cpp.

◆ addDisconnectPlayerCommand()

Bool NetPacket::addDisconnectPlayerCommand ( NetCommandRef * msg)
protected

Definition at line 3603 of file NetPacket.cpp.

◆ addDisconnectScreenOffCommand()

Bool NetPacket::addDisconnectScreenOffCommand ( NetCommandRef * msg)
protected

Definition at line 2161 of file NetPacket.cpp.

◆ addDisconnectVoteCommand()

Bool NetPacket::addDisconnectVoteCommand ( NetCommandRef * msg)
protected

Definition at line 3109 of file NetPacket.cpp.

◆ addFileAnnounceCommand()

Bool NetPacket::addFileAnnounceCommand ( NetCommandRef * msg)
protected

Definition at line 2487 of file NetPacket.cpp.

◆ addFileCommand()

Bool NetPacket::addFileCommand ( NetCommandRef * msg)
protected

Definition at line 2383 of file NetPacket.cpp.

◆ addFileProgressCommand()

Bool NetPacket::addFileProgressCommand ( NetCommandRef * msg)
protected

Definition at line 2596 of file NetPacket.cpp.

◆ addFrameCommand()

Bool NetPacket::addFrameCommand ( NetCommandRef * msg)
protected

Add this frame command message. Returns true if successful.

Definition at line 4358 of file NetPacket.cpp.

◆ addFrameResendRequestCommand()

Bool NetPacket::addFrameResendRequestCommand ( NetCommandRef * msg)
protected

Definition at line 2050 of file NetPacket.cpp.

◆ addGameCommand()

Bool NetPacket::addGameCommand ( NetCommandRef * msg)
protected

Adds this game command to the packet. Returns true if successful.

Definition at line 4695 of file NetPacket.cpp.

◆ addKeepAliveCommand()

Bool NetPacket::addKeepAliveCommand ( NetCommandRef * msg)
protected

Add a keep alive command to the packet. Returns true if successful.

Definition at line 3799 of file NetPacket.cpp.

◆ addLoadCompleteMessage()

Bool NetPacket::addLoadCompleteMessage ( NetCommandRef * msg)
protected

Add a Progress command to the packet. Returns true if successful.

Definition at line 2931 of file NetPacket.cpp.

◆ addPacketRouterAckCommand()

Bool NetPacket::addPacketRouterAckCommand ( NetCommandRef * msg)
protected

Definition at line 3439 of file NetPacket.cpp.

◆ addPacketRouterQueryCommand()

Bool NetPacket::addPacketRouterQueryCommand ( NetCommandRef * msg)
protected

Definition at line 3521 of file NetPacket.cpp.

◆ addPlayerLeaveCommand()

Bool NetPacket::addPlayerLeaveCommand ( NetCommandRef * msg)
protected

Add a player leave command to the packet. Returns true if successful.

Definition at line 4238 of file NetPacket.cpp.

◆ addProgressMessage()

Bool NetPacket::addProgressMessage ( NetCommandRef * msg)
protected

Add a Progress command to the packet. Returns true if successful.

Definition at line 3026 of file NetPacket.cpp.

◆ addRunAheadCommand()

Bool NetPacket::addRunAheadCommand ( NetCommandRef * msg)
protected

Add a run ahead command to the packet. Returns true if successful.

Definition at line 3879 of file NetPacket.cpp.

◆ addRunAheadMetricsCommand()

Bool NetPacket::addRunAheadMetricsCommand ( NetCommandRef * msg)
protected

Add a run ahead metrics command to the packet. Returns true if successful.

Definition at line 4125 of file NetPacket.cpp.

◆ addTimeOutGameStartMessage()

Bool NetPacket::addTimeOutGameStartMessage ( NetCommandRef * msg)
protected

Add a TimeOutGameStart to the packet. Returns true if successful.

Definition at line 2837 of file NetPacket.cpp.

◆ addWrapperCommand()

Bool NetPacket::addWrapperCommand ( NetCommandRef * msg)
protected

Definition at line 2697 of file NetPacket.cpp.

◆ ConstructBigCommandPacketList()

NetPacketList NetPacket::ConstructBigCommandPacketList ( NetCommandRef * ref)
static

Definition at line 153 of file NetPacket.cpp.

◆ ConstructNetCommandMsgFromRawData()

NetCommandRef * NetPacket::ConstructNetCommandMsgFromRawData ( UnsignedByte * data,
UnsignedShort dataLength )
static

Definition at line 43 of file NetPacket.cpp.

◆ dumpPacketToLog()

void NetPacket::dumpPacketToLog ( )
protected

Dumps the packet to the debug log file

Definition at line 5843 of file NetPacket.cpp.

◆ FillBufferWithAckCommand()

void NetPacket::FillBufferWithAckCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 944 of file NetPacket.cpp.

◆ FillBufferWithChatCommand()

void NetPacket::FillBufferWithChatCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1491 of file NetPacket.cpp.

◆ FillBufferWithCommand()

void NetPacket::FillBufferWithCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 739 of file NetPacket.cpp.

◆ FillBufferWithDestroyPlayerCommand()

void NetPacket::FillBufferWithDestroyPlayerCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1195 of file NetPacket.cpp.

◆ FillBufferWithDisconnectChatCommand()

void NetPacket::FillBufferWithDisconnectChatCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1406 of file NetPacket.cpp.

◆ FillBufferWithDisconnectFrameMessage()

void NetPacket::FillBufferWithDisconnectFrameMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1785 of file NetPacket.cpp.

◆ FillBufferWithDisconnectKeepAliveCommand()

void NetPacket::FillBufferWithDisconnectKeepAliveCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1271 of file NetPacket.cpp.

◆ FillBufferWithDisconnectPlayerCommand()

void NetPacket::FillBufferWithDisconnectPlayerCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1298 of file NetPacket.cpp.

◆ FillBufferWithDisconnectScreenOffMessage()

void NetPacket::FillBufferWithDisconnectScreenOffMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1823 of file NetPacket.cpp.

◆ FillBufferWithDisconnectVoteCommand()

void NetPacket::FillBufferWithDisconnectVoteCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1444 of file NetPacket.cpp.

◆ FillBufferWithFileAnnounceMessage()

void NetPacket::FillBufferWithFileAnnounceMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1693 of file NetPacket.cpp.

◆ FillBufferWithFileMessage()

void NetPacket::FillBufferWithFileMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1644 of file NetPacket.cpp.

◆ FillBufferWithFileProgressMessage()

void NetPacket::FillBufferWithFileProgressMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1743 of file NetPacket.cpp.

◆ FillBufferWithFrameCommand()

void NetPacket::FillBufferWithFrameCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 988 of file NetPacket.cpp.

◆ FillBufferWithFrameResendRequestMessage()

void NetPacket::FillBufferWithFrameResendRequestMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1861 of file NetPacket.cpp.

◆ FillBufferWithGameCommand()

void NetPacket::FillBufferWithGameCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 824 of file NetPacket.cpp.

◆ FillBufferWithKeepAliveCommand()

void NetPacket::FillBufferWithKeepAliveCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1245 of file NetPacket.cpp.

◆ FillBufferWithLoadCompleteMessage()

void NetPacket::FillBufferWithLoadCompleteMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1579 of file NetPacket.cpp.

◆ FillBufferWithPacketRouterAckCommand()

void NetPacket::FillBufferWithPacketRouterAckCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1375 of file NetPacket.cpp.

◆ FillBufferWithPacketRouterQueryCommand()

void NetPacket::FillBufferWithPacketRouterQueryCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1345 of file NetPacket.cpp.

◆ FillBufferWithPlayerLeaveCommand()

void NetPacket::FillBufferWithPlayerLeaveCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1041 of file NetPacket.cpp.

◆ FillBufferWithProgressMessage()

void NetPacket::FillBufferWithProgressMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1549 of file NetPacket.cpp.

◆ FillBufferWithRunAheadCommand()

void NetPacket::FillBufferWithRunAheadCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1139 of file NetPacket.cpp.

◆ FillBufferWithRunAheadMetricsCommand()

void NetPacket::FillBufferWithRunAheadMetricsCommand ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1091 of file NetPacket.cpp.

◆ FillBufferWithTimeOutGameStartMessage()

void NetPacket::FillBufferWithTimeOutGameStartMessage ( UnsignedByte * buffer,
NetCommandRef * msg )
staticprotected

Definition at line 1612 of file NetPacket.cpp.

◆ GetAckCommandSize()

UnsignedInt NetPacket::GetAckCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 358 of file NetPacket.cpp.

◆ getAddr()

UnsignedInt NetPacket::getAddr ( )

Returns the address that this packet is to be sent to. Only valid if the packet is locally constructed.

Definition at line 5815 of file NetPacket.cpp.

◆ GetBufferSizeNeededForCommand()

UnsignedInt NetPacket::GetBufferSizeNeededForCommand ( NetCommandMsg * msg)
staticprotected

Definition at line 233 of file NetPacket.cpp.

◆ GetChatCommandSize()

UnsignedInt NetPacket::GetChatCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 565 of file NetPacket.cpp.

◆ getCommandList()

NetCommandList * NetPacket::getCommandList ( )

Returns the list of commands that are in this packet.

Definition at line 4935 of file NetPacket.cpp.

◆ getData()

UnsignedByte * NetPacket::getData ( )

Returns the data of this packet.

Definition at line 5829 of file NetPacket.cpp.

◆ GetDestroyPlayerCommandSize()

UnsignedInt NetPacket::GetDestroyPlayerCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 440 of file NetPacket.cpp.

◆ GetDisconnectChatCommandSize()

UnsignedInt NetPacket::GetDisconnectChatCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 530 of file NetPacket.cpp.

◆ GetDisconnectFrameCommandSize()

UnsignedInt NetPacket::GetDisconnectFrameCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 699 of file NetPacket.cpp.

◆ GetDisconnectKeepAliveCommandSize()

UnsignedInt NetPacket::GetDisconnectKeepAliveCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 471 of file NetPacket.cpp.

◆ GetDisconnectPlayerCommandSize()

UnsignedInt NetPacket::GetDisconnectPlayerCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 485 of file NetPacket.cpp.

◆ GetDisconnectScreenOffCommandSize()

UnsignedInt NetPacket::GetDisconnectScreenOffCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 712 of file NetPacket.cpp.

◆ GetDisconnectVoteCommandSize()

UnsignedInt NetPacket::GetDisconnectVoteCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 548 of file NetPacket.cpp.

◆ GetFileAnnounceCommandSize()

UnsignedInt NetPacket::GetFileAnnounceCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 667 of file NetPacket.cpp.

◆ GetFileCommandSize()

UnsignedInt NetPacket::GetFileCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 650 of file NetPacket.cpp.

◆ GetFileProgressCommandSize()

UnsignedInt NetPacket::GetFileProgressCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 684 of file NetPacket.cpp.

◆ GetFrameCommandSize()

UnsignedInt NetPacket::GetFrameCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 372 of file NetPacket.cpp.

◆ GetFrameResendRequestCommandSize()

UnsignedInt NetPacket::GetFrameResendRequestCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 725 of file NetPacket.cpp.

◆ GetGameCommandSize()

UnsignedInt NetPacket::GetGameCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 302 of file NetPacket.cpp.

◆ GetKeepAliveCommandSize()

UnsignedInt NetPacket::GetKeepAliveCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 457 of file NetPacket.cpp.

◆ getLength()

Int NetPacket::getLength ( )

Returns the length of the packet.

Definition at line 5836 of file NetPacket.cpp.

◆ GetLoadCompleteMessageSize()

UnsignedInt NetPacket::GetLoadCompleteMessageSize ( NetCommandMsg * msg)
staticprotected

Definition at line 601 of file NetPacket.cpp.

◆ getNumCommands()

Int NetPacket::getNumCommands ( )

Returns the number of commands in this packet. Only valid if the packet is locally constructed.

Definition at line 5808 of file NetPacket.cpp.

◆ GetPacketRouterAckCommandSize()

UnsignedInt NetPacket::GetPacketRouterAckCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 516 of file NetPacket.cpp.

◆ GetPacketRouterQueryCommandSize()

UnsignedInt NetPacket::GetPacketRouterQueryCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 502 of file NetPacket.cpp.

◆ GetPlayerLeaveCommandSize()

UnsignedInt NetPacket::GetPlayerLeaveCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 388 of file NetPacket.cpp.

◆ getPort()

UnsignedShort NetPacket::getPort ( )

Returns the port that this packet is to be sent to. Only valid if the packet is locally constructed.

Definition at line 5822 of file NetPacket.cpp.

◆ GetProgressMessageSize()

UnsignedInt NetPacket::GetProgressMessageSize ( NetCommandMsg * msg)
staticprotected

Definition at line 586 of file NetPacket.cpp.

◆ GetRunAheadCommandSize()

UnsignedInt NetPacket::GetRunAheadCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 422 of file NetPacket.cpp.

◆ GetRunAheadMetricsCommandSize()

UnsignedInt NetPacket::GetRunAheadMetricsCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 405 of file NetPacket.cpp.

◆ GetTimeOutGameStartMessageSize()

UnsignedInt NetPacket::GetTimeOutGameStartMessageSize ( NetCommandMsg * msg)
staticprotected

Definition at line 615 of file NetPacket.cpp.

◆ GetWrapperCommandSize()

UnsignedInt NetPacket::GetWrapperCommandSize ( NetCommandMsg * msg)
staticprotected

Definition at line 630 of file NetPacket.cpp.

◆ init()

void NetPacket::init ( )

Initialize all the member variable values.

Definition at line 1932 of file NetPacket.cpp.

◆ isAckBothRepeat()

Bool NetPacket::isAckBothRepeat ( NetCommandRef * msg)
protected

Definition at line 4647 of file NetPacket.cpp.

◆ isAckRepeat()

Bool NetPacket::isAckRepeat ( NetCommandRef * msg)
protected

Definition at line 4628 of file NetPacket.cpp.

◆ isAckStage1Repeat()

Bool NetPacket::isAckStage1Repeat ( NetCommandRef * msg)
protected

Definition at line 4662 of file NetPacket.cpp.

◆ isAckStage2Repeat()

Bool NetPacket::isAckStage2Repeat ( NetCommandRef * msg)
protected

Definition at line 4677 of file NetPacket.cpp.

◆ isFrameRepeat()

Bool NetPacket::isFrameRepeat ( NetCommandRef * msg)
protected

Definition at line 4494 of file NetPacket.cpp.

◆ isRoomForAckMessage()

Bool NetPacket::isRoomForAckMessage ( NetCommandRef * msg)
protected

Returns true if there is enough room in the packet for this ack message.

Definition at line 4607 of file NetPacket.cpp.

◆ isRoomForChatMessage()

Bool NetPacket::isRoomForChatMessage ( NetCommandRef * msg)
protected

Definition at line 3405 of file NetPacket.cpp.

◆ isRoomForDestroyPlayerMessage()

Bool NetPacket::isRoomForDestroyPlayerMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this DestroyPlayer command in this packet.

Definition at line 4091 of file NetPacket.cpp.

◆ isRoomForDisconnectChatMessage()

Bool NetPacket::isRoomForDisconnectChatMessage ( NetCommandRef * msg)
protected

Definition at line 3288 of file NetPacket.cpp.

◆ isRoomForDisconnectFrameMessage()

Bool NetPacket::isRoomForDisconnectFrameMessage ( NetCommandRef * msg)
protected

Definition at line 2352 of file NetPacket.cpp.

◆ isRoomForDisconnectKeepAliveMessage()

Bool NetPacket::isRoomForDisconnectKeepAliveMessage ( NetCommandRef * msg)
protected

Returns true if there is room in the packet for this command.

Definition at line 3774 of file NetPacket.cpp.

◆ isRoomForDisconnectPlayerMessage()

Bool NetPacket::isRoomForDisconnectPlayerMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this player disconnect command in this packet.

Definition at line 3686 of file NetPacket.cpp.

◆ isRoomForDisconnectScreenOffMessage()

Bool NetPacket::isRoomForDisconnectScreenOffMessage ( NetCommandRef * msg)
protected

Definition at line 2241 of file NetPacket.cpp.

◆ isRoomForDisconnectVoteMessage()

Bool NetPacket::isRoomForDisconnectVoteMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this player disconnect command in this packet.

Definition at line 3192 of file NetPacket.cpp.

◆ isRoomForFileAnnounceMessage()

Bool NetPacket::isRoomForFileAnnounceMessage ( NetCommandRef * msg)
protected

Definition at line 2566 of file NetPacket.cpp.

◆ isRoomForFileMessage()

Bool NetPacket::isRoomForFileMessage ( NetCommandRef * msg)
protected

Definition at line 2457 of file NetPacket.cpp.

◆ isRoomForFileProgressMessage()

Bool NetPacket::isRoomForFileProgressMessage ( NetCommandRef * msg)
protected

Definition at line 2668 of file NetPacket.cpp.

◆ isRoomForFrameMessage()

Bool NetPacket::isRoomForFrameMessage ( NetCommandRef * msg)
protected

Returns true if there is enough room in this packet for this frame message.

Definition at line 4463 of file NetPacket.cpp.

◆ isRoomForFrameResendRequestMessage()

Bool NetPacket::isRoomForFrameResendRequestMessage ( NetCommandRef * msg)
protected

Definition at line 2130 of file NetPacket.cpp.

◆ isRoomForGameMessage()

Bool NetPacket::isRoomForGameMessage ( NetCommandRef * msg,
GameMessage * gmsg )
protected

Returns true if there is enough room in this packet for this message.

Definition at line 4861 of file NetPacket.cpp.

◆ isRoomForKeepAliveMessage()

Bool NetPacket::isRoomForKeepAliveMessage ( NetCommandRef * msg)
protected

Returns true if there is room in the packet for this command.

Definition at line 3854 of file NetPacket.cpp.

◆ isRoomForLoadCompleteMessage()

Bool NetPacket::isRoomForLoadCompleteMessage ( NetCommandRef * msg)
protected

Returns true if there is room in the packet for this command.

Definition at line 2998 of file NetPacket.cpp.

◆ isRoomForPacketRouterAckMessage()

Bool NetPacket::isRoomForPacketRouterAckMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this packet router ack command in this packet.

Definition at line 3499 of file NetPacket.cpp.

◆ isRoomForPacketRouterQueryMessage()

Bool NetPacket::isRoomForPacketRouterQueryMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this packet router query command in this packet.

Definition at line 3581 of file NetPacket.cpp.

◆ isRoomForPlayerLeaveMessage()

Bool NetPacket::isRoomForPlayerLeaveMessage ( NetCommandRef * msg)
protected

Returns true if there is enough room in the packet to fit this message.

Definition at line 4324 of file NetPacket.cpp.

◆ isRoomForProgressMessage()

Bool NetPacket::isRoomForProgressMessage ( NetCommandRef * msg)
protected

Returns true if there is room in the packet for this command.

Definition at line 3084 of file NetPacket.cpp.

◆ isRoomForRunAheadMessage()

Bool NetPacket::isRoomForRunAheadMessage ( NetCommandRef * msg)
protected

Returns true if there is room for this run ahead command in this packet.

Definition at line 3970 of file NetPacket.cpp.

◆ isRoomForRunAheadMetricsMessage()

Bool NetPacket::isRoomForRunAheadMetricsMessage ( NetCommandRef * msg)
protected

Returns true if there is enough room in the packet to fit this message.

Definition at line 4205 of file NetPacket.cpp.

◆ isRoomForTimeOutGameStartMessage()

Bool NetPacket::isRoomForTimeOutGameStartMessage ( NetCommandRef * msg)
protected

Returns true if there is room in the packet for this command.

Definition at line 2904 of file NetPacket.cpp.

◆ isRoomForWrapperMessage()

Bool NetPacket::isRoomForWrapperMessage ( NetCommandRef * msg)
protected

Definition at line 2800 of file NetPacket.cpp.

◆ readAckBothMessage()

NetCommandMsg * NetPacket::readAckBothMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the data portion of the ack message at this position in the packet.

Definition at line 5351 of file NetPacket.cpp.

◆ readAckStage1Message()

NetCommandMsg * NetPacket::readAckStage1Message ( UnsignedByte * data,
Int & i )
staticprotected

Reads the data portion of the ack message at this position in the packet.

Definition at line 5374 of file NetPacket.cpp.

◆ readAckStage2Message()

NetCommandMsg * NetPacket::readAckStage2Message ( UnsignedByte * data,
Int & i )
staticprotected

Reads the data portion of the ack message at this position in the packet.

Definition at line 5397 of file NetPacket.cpp.

◆ readChatMessage()

NetCommandMsg * NetPacket::readChatMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the chat data, which is just the string.

Definition at line 5583 of file NetPacket.cpp.

◆ readDestroyPlayerMessage()

NetCommandMsg * NetPacket::readDestroyPlayerMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the CRC info message at this position in the packet.

Definition at line 5490 of file NetPacket.cpp.

◆ readDisconnectChatMessage()

NetCommandMsg * NetPacket::readDisconnectChatMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the disconnect chat data, which is just the string.

Definition at line 5560 of file NetPacket.cpp.

◆ readDisconnectFrameMessage()

NetCommandMsg * NetPacket::readDisconnectFrameMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5770 of file NetPacket.cpp.

◆ readDisconnectKeepAliveMessage()

NetCommandMsg * NetPacket::readDisconnectKeepAliveMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the disconnect keep alive data, of which there is none.

Definition at line 5514 of file NetPacket.cpp.

◆ readDisconnectPlayerMessage()

NetCommandMsg * NetPacket::readDisconnectPlayerMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the disconnect player data. Which is the slot number of the player being disconnected.

Definition at line 5523 of file NetPacket.cpp.

◆ readDisconnectScreenOffMessage()

NetCommandMsg * NetPacket::readDisconnectScreenOffMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5783 of file NetPacket.cpp.

◆ readDisconnectVoteMessage()

NetCommandMsg * NetPacket::readDisconnectVoteMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the disconnect vote data. Which is the slot number of the player being disconnected.

Definition at line 5611 of file NetPacket.cpp.

◆ readFileAnnounceMessage()

NetCommandMsg * NetPacket::readFileAnnounceMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5727 of file NetPacket.cpp.

◆ readFileMessage()

NetCommandMsg * NetPacket::readFileMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5700 of file NetPacket.cpp.

◆ readFileProgressMessage()

NetCommandMsg * NetPacket::readFileProgressMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5754 of file NetPacket.cpp.

◆ readFrameMessage()

NetCommandMsg * NetPacket::readFrameMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the data portion of the frame message at this position in the packet.

Definition at line 5420 of file NetPacket.cpp.

◆ readFrameResendRequestMessage()

NetCommandMsg * NetPacket::readFrameResendRequestMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5794 of file NetPacket.cpp.

◆ readGameMessage()

NetCommandMsg * NetPacket::readGameMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the data portion of a game message from the given position in the packet.

Definition at line 5202 of file NetPacket.cpp.

◆ readGameMessageArgumentFromPacket()

void NetPacket::readGameMessageArgumentFromPacket ( GameMessageArgumentDataType type,
NetGameCommandMsg * msg,
UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5267 of file NetPacket.cpp.

◆ readKeepAliveMessage()

NetCommandMsg * NetPacket::readKeepAliveMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the keep alive data, of which there is none.

Definition at line 5505 of file NetPacket.cpp.

◆ readLoadCompleteMessage()

NetCommandMsg * NetPacket::readLoadCompleteMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5641 of file NetPacket.cpp.

◆ readPacketRouterAckMessage()

NetCommandMsg * NetPacket::readPacketRouterAckMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the packet router ack data, of which there is none.

Definition at line 5551 of file NetPacket.cpp.

◆ readPacketRouterQueryMessage()

NetCommandMsg * NetPacket::readPacketRouterQueryMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the packet router query data, of which there is none.

Definition at line 5542 of file NetPacket.cpp.

◆ readPlayerLeaveMessage()

NetCommandMsg * NetPacket::readPlayerLeaveMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the player leave message at this position in the packet.

Definition at line 5437 of file NetPacket.cpp.

◆ readProgressMessage()

NetCommandMsg * NetPacket::readProgressMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the Progress data. Which is the slot number of the player being disconnected.

Definition at line 5630 of file NetPacket.cpp.

◆ readRunAheadMessage()

NetCommandMsg * NetPacket::readRunAheadMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the run ahead message at this position in the packet.

Definition at line 5471 of file NetPacket.cpp.

◆ readRunAheadMetricsMessage()

NetCommandMsg * NetPacket::readRunAheadMetricsMessage ( UnsignedByte * data,
Int & i )
staticprotected

Reads the run ahead metrics message at this position in the packet.

Definition at line 5452 of file NetPacket.cpp.

◆ readTimeOutGameStartMessage()

NetCommandMsg * NetPacket::readTimeOutGameStartMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5646 of file NetPacket.cpp.

◆ readWrapperMessage()

NetCommandMsg * NetPacket::readWrapperMessage ( UnsignedByte * data,
Int & i )
staticprotected

Definition at line 5651 of file NetPacket.cpp.

◆ reset()

void NetPacket::reset ( )

Definition at line 1948 of file NetPacket.cpp.

◆ setAddress()

void NetPacket::setAddress ( Int addr,
Int port )

Set the address to which this packet is to be sent.

Definition at line 1959 of file NetPacket.cpp.

◆ writeGameMessageArgumentToPacket()

void NetPacket::writeGameMessageArgumentToPacket ( GameMessageArgumentDataType type,
GameMessageArgumentType arg )
protected

Definition at line 4821 of file NetPacket.cpp.

Member Data Documentation

◆ m_addr

UnsignedInt NetPacket::m_addr
protected

Definition at line 229 of file NetPacket.h.

◆ m_lastCommand

NetCommandRef* NetPacket::m_lastCommand
protected

Definition at line 231 of file NetPacket.h.

◆ m_lastCommandID

UnsignedShort NetPacket::m_lastCommandID
protected

Definition at line 234 of file NetPacket.h.

◆ m_lastCommandType

UnsignedByte NetPacket::m_lastCommandType
protected

Definition at line 236 of file NetPacket.h.

◆ m_lastFrame

UnsignedInt NetPacket::m_lastFrame
protected

Definition at line 232 of file NetPacket.h.

◆ m_lastPlayerID

UnsignedByte NetPacket::m_lastPlayerID
protected

Definition at line 235 of file NetPacket.h.

◆ m_lastRelay

UnsignedByte NetPacket::m_lastRelay
protected

Definition at line 237 of file NetPacket.h.

◆ m_numCommands

Int NetPacket::m_numCommands
protected

Definition at line 230 of file NetPacket.h.

◆ m_packet

UnsignedByte NetPacket::m_packet[MAX_PACKET_SIZE]
protected

Definition at line 227 of file NetPacket.h.

◆ m_packetLen

Int NetPacket::m_packetLen
protected

Definition at line 228 of file NetPacket.h.

◆ m_port

UnsignedShort NetPacket::m_port
protected

Definition at line 233 of file NetPacket.h.


The documentation for this class was generated from the following files: