_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
Go to the source code of this file.
netconnect.h - The network connection setup header file. | |
#define | NetworkProtocolMajorVersion StratagusMajorVersion |
Network protocol major version. More... | |
#define | NetworkProtocolMinorVersion StratagusMinorVersion |
Network protocol minor version (maximum 99) More... | |
#define | NetworkProtocolPatchLevel StratagusPatchLevel |
Network protocol patch level (maximum 99) More... | |
#define | NetworkProtocolVersion |
Network protocol version (1,2,3) -> 10203. More... | |
#define | NetworkProtocolFormatString "%d.%d.%d" |
Network protocol printf format string. More... | |
#define | NetworkProtocolFormatArgs(v) (v) / 10000, ((v) / 100) % 100, (v) % 100 |
Network protocol printf format arguments. More... | |
enum | _net_client_con_state_ { ccs_unused = 0, ccs_connecting, ccs_connected, ccs_mapinfo, ccs_badmap, ccs_synced, ccs_async, ccs_changed, ccs_detaching, ccs_disconnected, ccs_unreachable, ccs_usercanceled, ccs_nofreeslots, ccs_serverquits, ccs_goahead, ccs_started, ccs_incompatibleengine, ccs_incompatibleluafiles, ccs_needmap } |
int | NetPlayers |
Player number of local client. More... | |
CNetworkHost | Hosts [PlayerMax] |
Network players. More... | |
int | NetConnectRunning |
Host, port, and number of all players. More... | |
int | NetConnectType |
Network menu: Setup mode active. More... | |
int | NetLocalHostsSlot |
Network menu: Setup mode active. More... | |
int | NetLocalPlayerNumber |
Network menu: Slot # in Hosts array of local client. More... | |
std::string | NetworkMapName |
Player number of local client. More... | |
std::string | NetworkMapFragmentName |
Name of the map received with ICMMap. More... | |
CServerSetup | ServerSetupState |
Name of the map currently loading via ICMMapNeeded. More... | |
CServerSetup | LocalSetupState |
Network menu: Multiplayer Server Menu selections state. More... | |
bool | NoRandomPlacementMultiplayer |
Network menu: Multiplayer Client Menu selections local state. More... | |
int | FindHostIndexBy (const CHost &host) |
Disable the random placement of players in muliplayer mode. More... | |
void | NetworkServerStartGame () |
void | NetworkGamePrepareGameSettings () |
Server user has finally hit the start game button. More... | |
int | GetNetworkState () |
void | NetworkInitClientConnect () |
void | NetworkInitServerConnect (int openslots) |
Setup network connect state machine for clients. More... | |
int | NetworkParseSetupEvent (const unsigned char *buf, int size, const CHost &host) |
Setup network connect state machine for the server. More... | |
int | NetworkSetupServerAddress (const std::string &serveraddr, int port) |
Parse a network connect event. More... | |
void | NetworkProcessClientRequest () |
Menu: Setup the server IP. More... | |
void | NetworkProcessServerRequest () |
Menu Loop: Send out client request messages. More... | |
void | NetworkServerResyncClients () |
Menu Loop: Send out server request messages. More... | |
void | NetworkDetachFromServer () |
Menu Loop: Server: Mark clients state to send stateinfo message. More... | |
void | NetworkSendICMessage (CUDPSocket &socket, const CHost &host, const CInitMessage_Header &msg) |
Menu Loop: Client: Send GoodBye to the server and detach. More... | |
#define NetworkProtocolFormatArgs | ( | v | ) | (v) / 10000, ((v) / 100) % 100, (v) % 100 |
Network protocol printf format arguments.
#define NetworkProtocolFormatString "%d.%d.%d" |
Network protocol printf format string.
#define NetworkProtocolMajorVersion StratagusMajorVersion |
Network protocol major version.
#define NetworkProtocolMinorVersion StratagusMinorVersion |
Network protocol minor version (maximum 99)
#define NetworkProtocolPatchLevel StratagusPatchLevel |
Network protocol patch level (maximum 99)
#define NetworkProtocolVersion |
Network protocol version (1,2,3) -> 10203.
Network Client connect states
int FindHostIndexBy | ( | const CHost & | host | ) |
Disable the random placement of players in muliplayer mode.
int GetNetworkState | ( | ) |
void NetworkDetachFromServer | ( | ) |
Menu Loop: Server: Mark clients state to send stateinfo message.
Terminate and detach Network connect state machine for the client
void NetworkGamePrepareGameSettings | ( | ) |
Server user has finally hit the start game button.
Multiplayer network game final copy of server settings to game settings.
void NetworkInitClientConnect | ( | ) |
Setup Network connect state machine for clients
void NetworkInitServerConnect | ( | int | openslots | ) |
Setup network connect state machine for clients.
Setup Network connect state machine for the server
int NetworkParseSetupEvent | ( | const unsigned char * | buf, |
int | size, | ||
const CHost & | host | ||
) |
Setup network connect state machine for the server.
Parse a setup event. (Command type <= MessageInitEvent)
buf | Packet received |
size | size of the received packet. |
host | host which send the message |
void NetworkProcessClientRequest | ( | ) |
Menu: Setup the server IP.
Client Menu Loop: Send out client request messages
void NetworkProcessServerRequest | ( | ) |
Menu Loop: Send out client request messages.
Server Menu Loop: Send out server request messages
void NetworkSendICMessage | ( | CUDPSocket & | socket, |
const CHost & | host, | ||
const CInitMessage_Header & | msg | ||
) |
Menu Loop: Client: Send GoodBye to the server and detach.
void NetworkServerResyncClients | ( | ) |
Menu Loop: Send out server request messages.
Notify state change by menu user to connected clients
void NetworkServerStartGame | ( | ) |
Server user has finally hit the start game button. (This is run on the server)
int NetworkSetupServerAddress | ( | const std::string & | serveraddr, |
int | port | ||
) |
Parse a network connect event.
Setup the IP-Address of the network server to connect to
serveraddr | the serveraddress the user has entered |
CNetworkHost Hosts[PlayerMax] |
Network players.
CServerSetup LocalSetupState |
Network menu: Multiplayer Server Menu selections state.
int NetConnectRunning |
Host, port, and number of all players.
Host, port, and number of all players.
int NetConnectType |
Network menu: Setup mode active.
int NetLocalHostsSlot |
Network menu: Setup mode active.
int NetLocalPlayerNumber |
Network menu: Slot # in Hosts array of local client.
int NetPlayers |
Player number of local client.
std::string NetworkMapFragmentName |
Name of the map received with ICMMap.
std::string NetworkMapName |
Player number of local client.
Player number of local client.
bool NoRandomPlacementMultiplayer |
Network menu: Multiplayer Client Menu selections local state.
Network menu: Multiplayer Client Menu selections local state.
CServerSetup ServerSetupState |
Name of the map currently loading via ICMMapNeeded.
Name of the map currently loading via ICMMapNeeded.