____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <network.h>
Public Member Functions | |
| unsigned char * | Serialize (int numcommands) const |
| int | Deserialize (unsigned char *p, unsigned int len) |
Static Public Member Functions | |
| static size_t | Size (int numcommands) |
Public Attributes | |
| CNetworkPacketHeader | Header |
| Packet Header Info. | |
| CNetworkCommand | Command [MaxNetworkCommands] |
This is sent over the network.
Definition at line 212 of file network.h.
| unsigned char * CNetworkPacket::Serialize | ( | int | numcommands | ) | const |
Definition at line 380 of file network.cpp.
References Command, Header, MessageChat, MessageExtendedCommand, CNetworkCommand::Serialize(), CNetworkPacketHeader::Serialize(), CNetworkCommand::Size(), CNetworkPacketHeader::Size(), Size(), and CNetworkPacketHeader::Type.
Referenced by NetworkBroadcast(), and NetworkSendSelection().
| int CNetworkPacket::Deserialize | ( | unsigned char * | p, | |
| unsigned int | len | |||
| ) |
Definition at line 402 of file network.cpp.
References Command, CNetworkCommand::Deserialize(), CNetworkPacketHeader::Deserialize(), Header, MaxNetworkCommands, MessageChat, MessageExtendedCommand, CNetworkCommand::Size(), CNetworkPacketHeader::Size(), Size(), and CNetworkPacketHeader::Type.
Referenced by NetworkEvent().
| static size_t CNetworkPacket::Size | ( | int | numcommands | ) | [inline, static] |
Definition at line 216 of file network.h.
References CNetworkCommand::Size(), and CNetworkPacketHeader::Size().
Referenced by Deserialize(), NetworkBroadcast(), and Serialize().
Packet Header Info.
Definition at line 220 of file network.h.
Referenced by Deserialize(), NetworkEvent(), NetworkProcessSelection(), NetworkRecover(), NetworkResendCommands(), NetworkSendPacket(), NetworkSendSelection(), and Serialize().
| CNetworkCommand CNetworkPacket::Command[MaxNetworkCommands] |
Definition at line 221 of file network.h.
Referenced by Deserialize(), NetworkEvent(), NetworkProcessSelection(), NetworkSendPacket(), NetworkSendSelection(), and Serialize().
1.5.6