Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetClient.h
Show All 27 Lines | |||||
#include <deque> | #include <deque> | ||||
class CGame; | class CGame; | ||||
class CNetClientSession; | class CNetClientSession; | ||||
class CNetClientTurnManager; | class CNetClientTurnManager; | ||||
class CNetServer; | class CNetServer; | ||||
class ScriptInterface; | class ScriptInterface; | ||||
typedef struct _ENetHost ENetHost; | |||||
// NetClient session FSM states | // NetClient session FSM states | ||||
enum | enum | ||||
{ | { | ||||
NCS_UNCONNECTED, | NCS_UNCONNECTED, | ||||
NCS_CONNECT, | NCS_CONNECT, | ||||
NCS_HANDSHAKE, | NCS_HANDSHAKE, | ||||
NCS_AUTHENTICATE, | NCS_AUTHENTICATE, | ||||
NCS_INITIAL_GAMESETUP, | NCS_INITIAL_GAMESETUP, | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
CStr GetGUID() const { return m_GUID; } | CStr GetGUID() const { return m_GUID; } | ||||
/** | /** | ||||
* Set up a connection to the remote networked server. | * Set up a connection to the remote networked server. | ||||
* @param server IP address or host name to connect to | * @param server IP address or host name to connect to | ||||
* @return true on success, false on connection failure | * @return true on success, false on connection failure | ||||
*/ | */ | ||||
bool SetupConnection(const CStr& server, const u16 port); | bool SetupConnection(const CStr& server, const u16 port, ENetHost* enetClient = NULL); | ||||
/** | /** | ||||
* Destroy the connection to the server. | * Destroy the connection to the server. | ||||
* This client probably cannot be used again. | * This client probably cannot be used again. | ||||
*/ | */ | ||||
void DestroyConnection(); | void DestroyConnection(); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 180 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator