$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include <string>
#include "SDL.h"
Go to the source code of this file.
Classes | |
class | CNetworkHost |
struct | _network_state_ |
class | CServerSetup |
class | CInitMessage |
netconnect.h - The network connection setup header file. | |
#define | NetworkProtocolMajorVersion StratagusMajorVersion |
Network protocol major version. | |
#define | NetworkProtocolMinorVersion StratagusMinorVersion |
Network protocol minor version (maximal 99). | |
#define | NetworkProtocolPatchLevel StratagusPatchLevel |
Network protocol patch level (maximal 99). | |
#define | NetworkProtocolVersion |
Network protocol version (1,2,3) -> 10203. | |
#define | NetworkProtocolFormatString "%d.%d.%d" |
Network protocol printf format string. | |
#define | NetworkProtocolFormatArgs(v) (v) / 10000, ((v) / 100) % 100, (v) % 100 |
Network protocol printf format arguments. | |
#define | NetworkDefaultPort 6660 |
enum | _ic_message_subtype_ { ICMHello, ICMConfig, ICMEngineMismatch, ICMProtocolMismatch, ICMEngineConfMismatch, ICMMapUidMismatch, ICMGameFull, ICMWelcome, ICMWaiting, ICMMap, ICMState, ICMResync, ICMServerQuit, ICMGoodBye, ICMSeeYou, ICMGo, ICMAYT, ICMIAH } |
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_incompatiblenetwork } |
typedef struct _network_state_ | NetworkState |
std::string | NetworkArg |
int | NetPlayers |
Network command line argument. | |
char * | NetworkAddr |
Network players. | |
int | NetworkPort |
Local network address to use. | |
int | HostsCount |
Local network port to use. | |
CNetworkHost | Hosts [PlayerMax] |
Number of hosts. | |
int | NetConnectRunning |
Host, port, and number of all players. | |
NetworkState | NetStates [PlayerMax] |
Network menu: Setup mode active. | |
unsigned char | NetLocalState |
Network menu: Server: Client Host states. | |
int | NetLocalHostsSlot |
Network menu: Local Server/Client connect state. | |
int | NetLocalPlayerNumber |
Network menu: Slot # in Hosts array of local client. | |
CServerSetup | ServerSetupState |
Player number of local client. | |
CServerSetup | LocalSetupState |
Network menu: Multiplayer Server Menu selections state. | |
void | NetworkServerStartGame () |
Network menu: Multiplayer Client Menu selections local state. | |
void | NetworkGamePrepareGameSettings () |
Server user has finally hit the start game button. | |
void | NetworkConnectSetupGame () |
void | NetworkInitClientConnect () |
Assign Player slot, evaluate Setup state.. | |
void | NetworkExitClientConnect () |
Setup network connect state machine for clients. | |
void | NetworkInitServerConnect (int openslots) |
Terminate network connect state machine for clients. | |
void | NetworkExitServerConnect () |
Setup network connect state machine for the server. | |
int | NetworkParseSetupEvent (const unsigned char *buf, int size) |
Terminate network connect state machine for the server. | |
int | NetworkSetupServerAddress (const std::string &serveraddr) |
Parse a network connect event. | |
void | NetworkProcessClientRequest () |
Menu: Setup the server IP. | |
void | NetworkProcessServerRequest () |
Menu Loop: Send out client request messages. | |
void | NetworkServerResyncClients () |
Menu Loop: Send out server request messages. | |
void | NetworkDetachFromServer () |
Menu Loop: Server: Mark clients state to send stateinfo message. |
#define NetworkDefaultPort 6660 |
#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 (maximal 99).
#define NetworkProtocolPatchLevel StratagusPatchLevel |
Network protocol patch level (maximal 99).
#define NetworkProtocolVersion |
Value:
(NetworkProtocolMajorVersion * 10000 + NetworkProtocolMinorVersion * 100 + \ NetworkProtocolPatchLevel)
typedef struct _network_state_ NetworkState |
Connect state information of network systems active in current game.
enum _ic_message_subtype_ |
Network init config message subtypes (menu state machine).
Network Client connect states
void NetworkConnectSetupGame | ( | ) |
Assign player slots and names in a network game..
void NetworkDetachFromServer | ( | ) |
Menu Loop: Server: Mark clients state to send stateinfo message.
Terminate and detach Network connect state machine for the client
void NetworkExitClientConnect | ( | ) |
Setup network connect state machine for clients.
Terminate Network connect state machine for clients
void NetworkExitServerConnect | ( | ) |
Setup network connect state machine for the server.
Terminate Network connect state machine for the server
void NetworkGamePrepareGameSettings | ( | ) |
Server user has finally hit the start game button.
Multiplayer network game final race an player type setup.
void NetworkInitClientConnect | ( | ) |
Assign Player slot, evaluate Setup state..
Setup Network connect state machine for clients
void NetworkInitServerConnect | ( | int | openslots | ) |
Terminate network connect state machine for clients.
Setup Network connect state machine for the server
int NetworkParseSetupEvent | ( | const unsigned char * | buf, | |
int | size | |||
) |
Terminate network connect state machine for the server.
Parse a setup event. (Command type <= MessageInitEvent)
buf | Packet received | |
size | size of the received packet. |
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 NetworkServerResyncClients | ( | ) |
Menu Loop: Send out server request messages.
Notify state change by menu user to connected clients
void NetworkServerStartGame | ( | ) |
Network menu: Multiplayer Client Menu selections local state.
Server user has finally hit the start game button
int NetworkSetupServerAddress | ( | const std::string & | serveraddr | ) |
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] |
Number of hosts.
int HostsCount |
Local network port to use.
Network menu: Multiplayer Server Menu selections state.
Host, port, and number of all players.
Network menu: Local Server/Client connect state.
Network menu: Slot # in Hosts array of local client.
unsigned char NetLocalState |
Network menu: Server: Client Host states.
int NetPlayers |
Network command line argument.
NetworkState NetStates[PlayerMax] |
Network menu: Setup mode active.
char* NetworkAddr |
Network players.
std::string NetworkArg |
int NetworkPort |
Local network address to use.
Player number of local client.
Player number of local client.
Client and server selection state for Multiplayer clients