#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 () |
| NetCommandList * | getCommandList () |
| UnsignedByte * | getData () |
| Int | getLength () |
| UnsignedInt | getAddr () |
| UnsignedShort | getPort () |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Static Public Member Functions | |
| static NetCommandRef * | ConstructNetCommandMsgFromRawData (UnsignedByte *data, UnsignedShort dataLength) |
| static NetPacketList | ConstructBigCommandPacketList (NetCommandRef *ref) |
Protected Attributes | |
| UnsignedByte | m_packet [MAX_PACKET_SIZE] |
| Int | m_packetLen |
| UnsignedInt | m_addr |
| Int | m_numCommands |
| NetCommandRef * | m_lastCommand |
| UnsignedInt | m_lastFrame |
| UnsignedShort | m_port |
| UnsignedShort | m_lastCommandID |
| UnsignedByte | m_lastPlayerID |
| UnsignedByte | m_lastCommandType |
| UnsignedByte | m_lastRelay |
Definition at line 52 of file NetPacket.h.
| NetPacket::NetPacket | ( | ) |
Constructor
Definition at line 1903 of file NetPacket.cpp.
| NetPacket::NetPacket | ( | TransportMessage * | msg | ) |
Constructor given raw transport data.
Definition at line 1910 of file NetPacket.cpp.
|
protected |
Add an ack "both" command.
Definition at line 4521 of file NetPacket.cpp.
|
protected |
Add this ack command to the packet. Returns true if successful.
Definition at line 4545 of file NetPacket.cpp.
|
protected |
Add an ack stage 1 command.
Definition at line 4529 of file NetPacket.cpp.
|
protected |
Add an ack stage 2 command.
Definition at line 4537 of file NetPacket.cpp.
|
protected |
Definition at line 3313 of file NetPacket.cpp.
| 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.
|
protected |
Add a DestroyPlayer command to the packet. Returns true if successful.
Definition at line 4005 of file NetPacket.cpp.
|
protected |
Definition at line 3222 of file NetPacket.cpp.
|
protected |
Definition at line 2272 of file NetPacket.cpp.
|
protected |
Add a keep alive command to the packet. Returns true if successful.
Definition at line 3719 of file NetPacket.cpp.
|
protected |
Definition at line 3603 of file NetPacket.cpp.
|
protected |
Definition at line 2161 of file NetPacket.cpp.
|
protected |
Definition at line 3109 of file NetPacket.cpp.
|
protected |
Definition at line 2487 of file NetPacket.cpp.
|
protected |
Definition at line 2383 of file NetPacket.cpp.
|
protected |
Definition at line 2596 of file NetPacket.cpp.
|
protected |
Add this frame command message. Returns true if successful.
Definition at line 4358 of file NetPacket.cpp.
|
protected |
Definition at line 2050 of file NetPacket.cpp.
|
protected |
Adds this game command to the packet. Returns true if successful.
Definition at line 4695 of file NetPacket.cpp.
|
protected |
Add a keep alive command to the packet. Returns true if successful.
Definition at line 3799 of file NetPacket.cpp.
|
protected |
Add a Progress command to the packet. Returns true if successful.
Definition at line 2931 of file NetPacket.cpp.
|
protected |
Definition at line 3439 of file NetPacket.cpp.
|
protected |
Definition at line 3521 of file NetPacket.cpp.
|
protected |
Add a player leave command to the packet. Returns true if successful.
Definition at line 4238 of file NetPacket.cpp.
|
protected |
Add a Progress command to the packet. Returns true if successful.
Definition at line 3026 of file NetPacket.cpp.
|
protected |
Add a run ahead command to the packet. Returns true if successful.
Definition at line 3879 of file NetPacket.cpp.
|
protected |
Add a run ahead metrics command to the packet. Returns true if successful.
Definition at line 4125 of file NetPacket.cpp.
|
protected |
Add a TimeOutGameStart to the packet. Returns true if successful.
Definition at line 2837 of file NetPacket.cpp.
|
protected |
Definition at line 2697 of file NetPacket.cpp.
|
static |
Definition at line 153 of file NetPacket.cpp.
|
static |
Definition at line 43 of file NetPacket.cpp.
|
protected |
Dumps the packet to the debug log file
Definition at line 5843 of file NetPacket.cpp.
|
staticprotected |
Definition at line 944 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1491 of file NetPacket.cpp.
|
staticprotected |
Definition at line 739 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1195 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1406 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1785 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1271 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1298 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1823 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1444 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1693 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1644 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1743 of file NetPacket.cpp.
|
staticprotected |
Definition at line 988 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1861 of file NetPacket.cpp.
|
staticprotected |
Definition at line 824 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1245 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1579 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1375 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1345 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1041 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1549 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1139 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1091 of file NetPacket.cpp.
|
staticprotected |
Definition at line 1612 of file NetPacket.cpp.
|
staticprotected |
Definition at line 358 of file NetPacket.cpp.
| 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.
|
staticprotected |
Definition at line 233 of file NetPacket.cpp.
|
staticprotected |
Definition at line 565 of file NetPacket.cpp.
| NetCommandList * NetPacket::getCommandList | ( | ) |
Returns the list of commands that are in this packet.
Definition at line 4935 of file NetPacket.cpp.
| UnsignedByte * NetPacket::getData | ( | ) |
Returns the data of this packet.
Definition at line 5829 of file NetPacket.cpp.
|
staticprotected |
Definition at line 440 of file NetPacket.cpp.
|
staticprotected |
Definition at line 530 of file NetPacket.cpp.
|
staticprotected |
Definition at line 699 of file NetPacket.cpp.
|
staticprotected |
Definition at line 471 of file NetPacket.cpp.
|
staticprotected |
Definition at line 485 of file NetPacket.cpp.
|
staticprotected |
Definition at line 712 of file NetPacket.cpp.
|
staticprotected |
Definition at line 548 of file NetPacket.cpp.
|
staticprotected |
Definition at line 667 of file NetPacket.cpp.
|
staticprotected |
Definition at line 650 of file NetPacket.cpp.
|
staticprotected |
Definition at line 684 of file NetPacket.cpp.
|
staticprotected |
Definition at line 372 of file NetPacket.cpp.
|
staticprotected |
Definition at line 725 of file NetPacket.cpp.
|
staticprotected |
Definition at line 302 of file NetPacket.cpp.
|
staticprotected |
Definition at line 457 of file NetPacket.cpp.
| Int NetPacket::getLength | ( | ) |
Returns the length of the packet.
Definition at line 5836 of file NetPacket.cpp.
|
staticprotected |
Definition at line 601 of file NetPacket.cpp.
| 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.
|
staticprotected |
Definition at line 516 of file NetPacket.cpp.
|
staticprotected |
Definition at line 502 of file NetPacket.cpp.
|
staticprotected |
Definition at line 388 of file NetPacket.cpp.
| 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.
|
staticprotected |
Definition at line 586 of file NetPacket.cpp.
|
staticprotected |
Definition at line 422 of file NetPacket.cpp.
|
staticprotected |
Definition at line 405 of file NetPacket.cpp.
|
staticprotected |
Definition at line 615 of file NetPacket.cpp.
|
staticprotected |
Definition at line 630 of file NetPacket.cpp.
| void NetPacket::init | ( | ) |
Initialize all the member variable values.
Definition at line 1932 of file NetPacket.cpp.
|
protected |
Definition at line 4647 of file NetPacket.cpp.
|
protected |
Definition at line 4628 of file NetPacket.cpp.
|
protected |
Definition at line 4662 of file NetPacket.cpp.
|
protected |
Definition at line 4677 of file NetPacket.cpp.
|
protected |
Definition at line 4494 of file NetPacket.cpp.
|
protected |
Returns true if there is enough room in the packet for this ack message.
Definition at line 4607 of file NetPacket.cpp.
|
protected |
Definition at line 3405 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this DestroyPlayer command in this packet.
Definition at line 4091 of file NetPacket.cpp.
|
protected |
Definition at line 3288 of file NetPacket.cpp.
|
protected |
Definition at line 2352 of file NetPacket.cpp.
|
protected |
Returns true if there is room in the packet for this command.
Definition at line 3774 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this player disconnect command in this packet.
Definition at line 3686 of file NetPacket.cpp.
|
protected |
Definition at line 2241 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this player disconnect command in this packet.
Definition at line 3192 of file NetPacket.cpp.
|
protected |
Definition at line 2566 of file NetPacket.cpp.
|
protected |
Definition at line 2457 of file NetPacket.cpp.
|
protected |
Definition at line 2668 of file NetPacket.cpp.
|
protected |
Returns true if there is enough room in this packet for this frame message.
Definition at line 4463 of file NetPacket.cpp.
|
protected |
Definition at line 2130 of file NetPacket.cpp.
|
protected |
Returns true if there is enough room in this packet for this message.
Definition at line 4861 of file NetPacket.cpp.
|
protected |
Returns true if there is room in the packet for this command.
Definition at line 3854 of file NetPacket.cpp.
|
protected |
Returns true if there is room in the packet for this command.
Definition at line 2998 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this packet router ack command in this packet.
Definition at line 3499 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this packet router query command in this packet.
Definition at line 3581 of file NetPacket.cpp.
|
protected |
Returns true if there is enough room in the packet to fit this message.
Definition at line 4324 of file NetPacket.cpp.
|
protected |
Returns true if there is room in the packet for this command.
Definition at line 3084 of file NetPacket.cpp.
|
protected |
Returns true if there is room for this run ahead command in this packet.
Definition at line 3970 of file NetPacket.cpp.
|
protected |
Returns true if there is enough room in the packet to fit this message.
Definition at line 4205 of file NetPacket.cpp.
|
protected |
Returns true if there is room in the packet for this command.
Definition at line 2904 of file NetPacket.cpp.
|
protected |
Definition at line 2800 of file NetPacket.cpp.
|
staticprotected |
Reads the data portion of the ack message at this position in the packet.
Definition at line 5351 of file NetPacket.cpp.
|
staticprotected |
Reads the data portion of the ack message at this position in the packet.
Definition at line 5374 of file NetPacket.cpp.
|
staticprotected |
Reads the data portion of the ack message at this position in the packet.
Definition at line 5397 of file NetPacket.cpp.
|
staticprotected |
Reads the chat data, which is just the string.
Definition at line 5583 of file NetPacket.cpp.
|
staticprotected |
Reads the CRC info message at this position in the packet.
Definition at line 5490 of file NetPacket.cpp.
|
staticprotected |
Reads the disconnect chat data, which is just the string.
Definition at line 5560 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5770 of file NetPacket.cpp.
|
staticprotected |
Reads the disconnect keep alive data, of which there is none.
Definition at line 5514 of file NetPacket.cpp.
|
staticprotected |
Reads the disconnect player data. Which is the slot number of the player being disconnected.
Definition at line 5523 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5783 of file NetPacket.cpp.
|
staticprotected |
Reads the disconnect vote data. Which is the slot number of the player being disconnected.
Definition at line 5611 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5727 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5700 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5754 of file NetPacket.cpp.
|
staticprotected |
Reads the data portion of the frame message at this position in the packet.
Definition at line 5420 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5794 of file NetPacket.cpp.
|
staticprotected |
Reads the data portion of a game message from the given position in the packet.
Definition at line 5202 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5267 of file NetPacket.cpp.
|
staticprotected |
Reads the keep alive data, of which there is none.
Definition at line 5505 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5641 of file NetPacket.cpp.
|
staticprotected |
Reads the packet router ack data, of which there is none.
Definition at line 5551 of file NetPacket.cpp.
|
staticprotected |
Reads the packet router query data, of which there is none.
Definition at line 5542 of file NetPacket.cpp.
|
staticprotected |
Reads the player leave message at this position in the packet.
Definition at line 5437 of file NetPacket.cpp.
|
staticprotected |
Reads the Progress data. Which is the slot number of the player being disconnected.
Definition at line 5630 of file NetPacket.cpp.
|
staticprotected |
Reads the run ahead message at this position in the packet.
Definition at line 5471 of file NetPacket.cpp.
|
staticprotected |
Reads the run ahead metrics message at this position in the packet.
Definition at line 5452 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5646 of file NetPacket.cpp.
|
staticprotected |
Definition at line 5651 of file NetPacket.cpp.
| void NetPacket::reset | ( | ) |
Definition at line 1948 of file NetPacket.cpp.
Set the address to which this packet is to be sent.
Definition at line 1959 of file NetPacket.cpp.
|
protected |
Definition at line 4821 of file NetPacket.cpp.
|
protected |
Definition at line 229 of file NetPacket.h.
|
protected |
Definition at line 231 of file NetPacket.h.
|
protected |
Definition at line 234 of file NetPacket.h.
|
protected |
Definition at line 236 of file NetPacket.h.
|
protected |
Definition at line 232 of file NetPacket.h.
|
protected |
Definition at line 235 of file NetPacket.h.
|
protected |
Definition at line 237 of file NetPacket.h.
|
protected |
Definition at line 230 of file NetPacket.h.
|
protected |
Definition at line 227 of file NetPacket.h.
|
protected |
Definition at line 228 of file NetPacket.h.
|
protected |
Definition at line 233 of file NetPacket.h.