_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
29 #ifndef __NETCONNECT_H__
30 #define __NETCONNECT_H__
44 #define NetworkProtocolMajorVersion StratagusMajorVersion
45 #define NetworkProtocolMinorVersion StratagusMinorVersion
47 #define NetworkProtocolPatchLevel StratagusPatchLevel
49 #define NetworkProtocolVersion \
51 (NetworkProtocolMajorVersion * 10000 + NetworkProtocolMinorVersion * 100 + \
52 NetworkProtocolPatchLevel)
55 #define NetworkProtocolFormatString "%d.%d.%d"
56 #define NetworkProtocolFormatArgs(v) (v) / 10000, ((v) / 100) % 100, (v) % 100
132 #endif // !__NETCONNECT_H__
@ ccs_unused
Definition: netconnect.h:67
@ ccs_incompatibleengine
Server has started game.
Definition: netconnect.h:83
std::string NetworkMapName
Player number of local client.
Definition: netconnect.cpp:111
CServerSetup ServerSetupState
Name of the map currently loading via ICMMapNeeded.
Definition: netconnect.cpp:115
void NetworkSendICMessage(CUDPSocket &socket, const CHost &host, const CInitMessage_Header &msg)
Menu Loop: Client: Send GoodBye to the server and detach.
Definition: netconnect.cpp:241
@ ccs_connected
New client.
Definition: netconnect.h:69
@ ccs_incompatibleluafiles
Incompatible engine version.
Definition: netconnect.h:84
@ ccs_async
Client is in sync with server.
Definition: netconnect.h:73
@ ccs_synced
Has received non-matching map-info.
Definition: netconnect.h:72
@ ccs_badmap
Has received matching map-info.
Definition: netconnect.h:71
@ ccs_changed
Server user has changed selection.
Definition: netconnect.h:74
Definition: netsockets.h:57
@ ccs_connecting
Unused.
Definition: netconnect.h:68
@ ccs_disconnected
Client user wants to detach.
Definition: netconnect.h:76
@ ccs_nofreeslots
Connection canceled by user.
Definition: netconnect.h:79
std::string NetworkMapFragmentName
Name of the map received with ICMMap.
Definition: netconnect.cpp:112
@ ccs_serverquits
Server has no more free slots.
Definition: netconnect.h:80
int NetworkParseSetupEvent(const unsigned char *buf, int size, const CHost &host)
Setup network connect state machine for the server.
Definition: netconnect.cpp:1617
constexpr unsigned char PlayerMax
Definition: settings.h:62
Definition: net_message.h:54
void NetworkInitServerConnect(int openslots)
Setup network connect state machine for clients.
Definition: netconnect.cpp:1975
@ ccs_goahead
Server quits.
Definition: netconnect.h:81
@ ccs_unreachable
Client has detached.
Definition: netconnect.h:77
@ ccs_detaching
Client user has made menu selection.
Definition: netconnect.h:75
int NetConnectType
Network menu: Setup mode active.
Definition: netconnect.cpp:106
int NetLocalHostsSlot
Network menu: Setup mode active.
Definition: netconnect.cpp:107
int FindHostIndexBy(const CHost &host)
Disable the random placement of players in muliplayer mode.
Definition: netconnect.cpp:1666
int NetworkSetupServerAddress(const std::string &serveraddr, int port)
Parse a network connect event.
Definition: netconnect.cpp:1947
void NetworkProcessServerRequest()
Menu Loop: Send out client request messages.
Definition: netconnect.cpp:1679
CServerSetup LocalSetupState
Network menu: Multiplayer Server Menu selections state.
Definition: netconnect.cpp:116
int NetLocalPlayerNumber
Network menu: Slot # in Hosts array of local client.
Definition: netconnect.cpp:108
_net_client_con_state_
Definition: netconnect.h:66
void NetworkProcessClientRequest()
Menu: Setup the server IP.
Definition: netconnect.cpp:1654
@ ccs_usercanceled
Server is unreachable.
Definition: netconnect.h:78
void NetworkServerResyncClients()
Menu Loop: Send out server request messages.
Definition: netconnect.cpp:2009
int GetNetworkState()
Definition: netconnect.cpp:1661
void NetworkGamePrepareGameSettings()
Server user has finally hit the start game button.
Definition: netconnect.cpp:2019
@ ccs_needmap
Incompatible lua files.
Definition: netconnect.h:85
int NetConnectRunning
Host, port, and number of all players.
Definition: netconnect.cpp:105
bool NoRandomPlacementMultiplayer
Network menu: Multiplayer Client Menu selections local state.
Definition: netconnect.cpp:113
void NetworkDetachFromServer()
Menu Loop: Server: Mark clients state to send stateinfo message.
Definition: netconnect.cpp:1967
int NetPlayers
Player number of local client.
Definition: netconnect.cpp:110
void NetworkServerStartGame()
Definition: netconnect.cpp:1710
void NetworkInitClientConnect()
Definition: netconnect.cpp:1693
@ ccs_mapinfo
Has received slot info.
Definition: netconnect.h:70
CNetworkHost Hosts[PlayerMax]
Network players.
Definition: netconnect.cpp:103
Definition: net_message.h:107
Definition: netsockets.h:36
@ ccs_started
Server wants to start game.
Definition: netconnect.h:82
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.