network
Class CNetClient
CSocketBase
|
+--CStreamSocket, IMessagePipeEnd
|
+--CMessageSocket
|
+--CNetSession, CJSObject, CTurnManager
|
+--CNetClient
in Client.h
in Client.cpp
- class CNetClient
- extends CJSObject, CNetSession, CTurnManager
|
Method Summary |
bool |
AuthenticateHandler( CNetMessage* pMsg, CNetSession* pSession )
|
bool |
BaseHandler( CNetMessage* pMsg, CNetSession* pSession )
|
bool |
ChatHandler( CNetMessage* pMsg, CNetSession* pSession )
|
bool |
ConnectHandler( CNetMessage* pMsg, CNetSession* pSession )
|
CPlayer* |
GetLocalPlayer()
|
bool |
HandshakeHandler( CNetMessage* pMsg, CNetSession* pSession )
|
bool |
InGameHandler( CNetMessage* pMsg, CNetSession* pSession )
|
private bool |
JSI_BeginConnect( JSContext* UNUSED( cx ), uintN argc, jsval* argv )
|
protected virtual void |
NewTurn()
|
private void |
OnClientConnect( int sessionID, const CStrW& name )
|
private void |
OnClientDisconnect( int sessionID )
|
private void |
OnStartGameMessage()
|
bool |
PreGameHandler( CNetMessage* pMsg, CNetSession* pSession )
|
protected virtual void |
QueueLocalCommand( CNetMessage* pMsg )
|
private static void |
ScriptingInit()
|
int |
StartGame()
|
| Methods inherited from class CJSObject |
ScriptingInit, ScriptingShutdown, GetProperty, SetProperty, HasProperty, AddProperty, AddProperty, AddProperty, AddMethod, AddProperty, AddLocalProperty, GetScript, CreateScriptObject, ReleaseScriptObject, Shutdown |
| Methods inherited from class CTurnManager |
ClearBatch, RotateBatches, IterateBatch, SendBatch, SendMessage, QueueMessage, SetClientPipe, SetTurnLength, GetTurnLength, Initialize, RecordBatch, RecordIterator, NewTurn, QueueLocalCommand |
| Methods inherited from class CStreamSocket |
BeginConnect, Read, Write, OnClose, ConnectComplete, ReadComplete, WriteComplete, OnWrite, OnRead, SetSocketOptions, Lock, Unlock |
| Methods inherited from class CSocketBase |
Shutdown, Initialize, Close, Destroy, SetNonBlocking, SetTcpNoDelay, Read, Write, Connect, Bind, PreAccept, Accept, Reject, GetOpMask, SetOpMask, GetProtocol, IsNonBlocking, GetErrorState, GetState, GetRemoteAddress, OnRead, OnWrite, OnClose |
AuthenticateHandler
public static MessageHandler AuthenticateHandler;
BaseHandler
public static MessageHandler BaseHandler;
ChatHandler
public static MessageHandler ChatHandler;
ConnectHandler
public static MessageHandler ConnectHandler;
HandshakeHandler
public static MessageHandler HandshakeHandler;
InGameHandler
public static MessageHandler InGameHandler;
m_JSI_ServerSessions
private CJSMap< CNetClient::SessionMap > m_JSI_ServerSessions;
m_OnChat
private CScriptObject m_OnChat;
m_OnClientConnect
private CScriptObject m_OnClientConnect;
m_OnClientDisconnect
private CScriptObject m_OnClientDisconnect;
m_OnConnectComplete
private CScriptObject m_OnConnectComplete;
m_OnDisconnect
private CScriptObject m_OnDisconnect;
m_OnStartGame
private CScriptObject m_OnStartGame;
m_Password
private CStrW m_Password;
m_pGame
private CGame* m_pGame;
m_pGameAttributes
private CGameAttributes* m_pGameAttributes;
m_pLocalPlayerSlot
private CPlayerSlot* m_pLocalPlayerSlot;
m_ServerSessions
private CNetClient::SessionMap m_ServerSessions;
m_SessionID
private int m_SessionID;
PreGameHandler
public static MessageHandler PreGameHandler;
CNetClient
public CNetClient( CGame* pGame, CGameAttributes* pGameAttribs );
~CNetClient
public virtual ~CNetClient();
AuthenticateHandler
bool AuthenticateHandler( CNetMessage* pMsg, CNetSession* pSession );
BaseHandler
bool BaseHandler( CNetMessage* pMsg, CNetSession* pSession );
ChatHandler
bool ChatHandler( CNetMessage* pMsg, CNetSession* pSession );
ConnectHandler
bool ConnectHandler( CNetMessage* pMsg, CNetSession* pSession );
GetLocalPlayer
public CPlayer* GetLocalPlayer();
HandshakeHandler
bool HandshakeHandler( CNetMessage* pMsg, CNetSession* pSession );
InGameHandler
bool InGameHandler( CNetMessage* pMsg, CNetSession* pSession );
JSI_BeginConnect
private bool JSI_BeginConnect( JSContext* UNUSED( cx ), uintN argc, jsval* argv );
NewTurn
protected virtual void NewTurn();
OnClientConnect
private void OnClientConnect( int sessionID, const CStrW& name );
OnClientDisconnect
private void OnClientDisconnect( int sessionID );
OnStartGameMessage
private void OnStartGameMessage();
PreGameHandler
bool PreGameHandler( CNetMessage* pMsg, CNetSession* pSession );
QueueLocalCommand
protected virtual void QueueLocalCommand( CNetMessage* pMsg );
ScriptingInit
private static void ScriptingInit();
StartGame
public int StartGame();