____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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 <netconnect.h>
Public Member Functions | |
| unsigned char * | Serialize () const |
| void | Deserialize (const unsigned char *p) |
Static Public Member Functions | |
| static size_t | Size () |
Public Attributes | |
| Uint8 | Type |
| Init message type. | |
| Uint8 | SubType |
| Init message subtype. | |
| Sint32 | Stratagus |
| Stratagus engine version. | |
| Sint32 | Version |
| Network protocol version. | |
| Uint32 | ConfUID |
| Engine configuration UID (Checksum) FIXME: not available yet. | |
| Uint32 | MapUID |
| UID of map to play. FIXME: add MAP name, path, etc. | |
| Sint32 | Lag |
| Lag time. | |
| Sint32 | Updates |
| Update frequency. | |
| Uint8 | HostsCount |
| Number of hosts. | |
| union { | |
| CNetworkHost Hosts [PlayerMax] | |
| Participant information. | |
| char MapPath [256] | |
| CServerSetup State | |
| Server Setup State information. | |
| } | u |
Definition at line 121 of file netconnect.h.
| unsigned char * CInitMessage::Serialize | ( | ) | const |
Definition at line 178 of file netconnect.cpp.
References ConfUID, HostsCount, ICMConfig, ICMGo, ICMHello, ICMMap, ICMResync, ICMState, ICMWelcome, Lag, MapUID, PlayerMax, CServerSetup::Size(), CNetworkHost::Size(), Size(), Stratagus, SubType, Type, u, Updates, and Version.
Referenced by NetworkSendICMessage().
| void CInitMessage::Deserialize | ( | const unsigned char * | p | ) |
Definition at line 228 of file netconnect.cpp.
References ConfUID, HostsCount, ICMConfig, ICMGo, ICMHello, ICMMap, ICMResync, ICMState, ICMWelcome, Lag, MapUID, PlayerMax, CServerSetup::Size(), CNetworkHost::Size(), Stratagus, SubType, Type, u, Updates, and Version.
Referenced by NetworkParseSetupEvent(), and NetworkServerStartGame().
| static size_t CInitMessage::Size | ( | ) | [inline, static] |
Definition at line 125 of file netconnect.h.
Referenced by NetworkParseSetupEvent(), NetworkSendICMessage(), NetworkServerStartGame(), and Serialize().
| Uint8 CInitMessage::Type |
Init message type.
Definition at line 127 of file netconnect.h.
Referenced by CheckVersions(), ClientParseAreYouThere(), ClientParseBadMap(), Deserialize(), NetworkExitServerConnect(), NetworkParseMenuPacket(), NetworkParseSetupEvent(), NetworkProcessClientRequest(), NetworkProcessServerRequest(), NetworkSendRateLimitedClientMessage(), NetworkServerStartGame(), Serialize(), ServerParseGoodBye(), ServerParseHello(), ServerParseMap(), ServerParseResync(), ServerParseState(), and ServerParseWaiting().
| Uint8 CInitMessage::SubType |
Init message subtype.
Definition at line 128 of file netconnect.h.
Referenced by CheckVersions(), ClientParseAreYouThere(), ClientParseAsync(), ClientParseBadMap(), ClientParseConnected(), ClientParseConnecting(), ClientParseDetaching(), ClientParseGoAhead(), ClientParseMapInfo(), ClientParseStarted(), ClientParseSynced(), Deserialize(), NetworkExitServerConnect(), NetworkParseMenuPacket(), NetworkProcessClientRequest(), NetworkProcessServerRequest(), NetworkSendRateLimitedClientMessage(), NetworkServerStartGame(), Serialize(), ServerParseGoodBye(), ServerParseHello(), ServerParseMap(), ServerParseResync(), ServerParseState(), and ServerParseWaiting().
| Sint32 CInitMessage::Stratagus |
Stratagus engine version.
Definition at line 129 of file netconnect.h.
Referenced by CheckVersions(), ClientParseConnecting(), Deserialize(), NetworkSendICMessage(), and Serialize().
| Sint32 CInitMessage::Version |
Network protocol version.
Definition at line 130 of file netconnect.h.
Referenced by CheckVersions(), ClientParseConnecting(), Deserialize(), NetworkSendICMessage(), and Serialize().
| Uint32 CInitMessage::ConfUID |
Engine configuration UID (Checksum) FIXME: not available yet.
Definition at line 131 of file netconnect.h.
Referenced by Deserialize(), and Serialize().
| Uint32 CInitMessage::MapUID |
UID of map to play. FIXME: add MAP name, path, etc.
Definition at line 132 of file netconnect.h.
Referenced by CheckVersions(), ClientParseConnected(), Deserialize(), NetworkProcessClientRequest(), NetworkProcessServerRequest(), NetworkServerStartGame(), Serialize(), ServerParseHello(), ServerParseMap(), ServerParseState(), and ServerParseWaiting().
| Sint32 CInitMessage::Lag |
Lag time.
Definition at line 133 of file netconnect.h.
Referenced by ClientParseConnecting(), Deserialize(), NetworkSendICMessage(), and Serialize().
| Sint32 CInitMessage::Updates |
Update frequency.
Definition at line 134 of file netconnect.h.
Referenced by ClientParseConnecting(), Deserialize(), NetworkSendICMessage(), and Serialize().
| Uint8 CInitMessage::HostsCount |
Number of hosts.
Definition at line 135 of file netconnect.h.
Referenced by ClientParseSynced(), Deserialize(), NetworkConnectSetupGame(), NetworkServerStartGame(), and Serialize().
| CNetworkHost CInitMessage::Hosts[PlayerMax] |
Participant information.
Definition at line 138 of file netconnect.h.
Referenced by ClientParseAsync(), ClientParseConnecting(), ClientParseSynced(), NetworkProcessClientRequest(), NetworkServerStartGame(), ServerParseHello(), and ServerParseResync().
| char CInitMessage::MapPath[256] |
Definition at line 139 of file netconnect.h.
Referenced by ClientParseConnected(), and ServerParseWaiting().
Server Setup State information.
Definition at line 140 of file netconnect.h.
Referenced by ClientParseGoAhead(), ClientParseMapInfo(), ClientParseSynced(), NetworkProcessClientRequest(), NetworkServerResyncClients(), NetworkServerStartGame(), ServerParseGoodBye(), ServerParseMap(), ServerParseResync(), ServerParseSeeYou(), ServerParseState(), and ServerParseWaiting().
| union { ... } CInitMessage::u |
Referenced by ClientParseAsync(), ClientParseConnected(), ClientParseConnecting(), ClientParseGoAhead(), ClientParseMapInfo(), ClientParseSynced(), Deserialize(), NetworkProcessClientRequest(), NetworkServerStartGame(), Serialize(), ServerParseHello(), ServerParseMap(), ServerParseResync(), ServerParseState(), and ServerParseWaiting().
1.5.6