Pyrogenesis
13997
|
The server's end of a network session. More...
#include <NetSession.h>
Public Member Functions | |
CNetServerSession (CNetServerWorker &server, ENetPeer *peer) | |
CNetServerWorker & | GetServer () |
const CStr & | GetGUID () const |
void | SetGUID (const CStr &guid) |
const CStrW & | GetUserName () const |
void | SetUserName (const CStrW &name) |
u32 | GetHostID () const |
void | SetHostID (u32 id) |
void | Disconnect (u32 reason) |
Sends a disconnection notification to the client, and sends a NMT_CONNECTION_LOST message to the session FSM. More... | |
void | DisconnectNow (u32 reason) |
Sends an unreliable disconnection notification to the client. More... | |
virtual bool | SendMessage (const CNetMessage *message) |
Send a message to the client. More... | |
CNetFileTransferer & | GetFileTransferer () |
![]() | |
CFsm (void) | |
virtual | ~CFsm (void) |
virtual void | Setup (void) |
Constructs the state machine. More... | |
void | Shutdown (void) |
Clear event, action and condition lists and reset state machine. More... | |
void | AddState (unsigned int state) |
CFsmEvent * | AddEvent (unsigned int eventType) |
CFsmTransition * | AddTransition (unsigned int state, unsigned int eventType, unsigned int nextState) |
CFsmTransition * | AddTransition (unsigned int state, unsigned int eventType, unsigned int nextState, void *pAction, void *pContext) |
CFsmTransition * | GetTransition (unsigned int state, unsigned int eventType) const |
CFsmTransition * | GetEventTransition (unsigned int eventType) const |
void | SetFirstState (unsigned int firstState) |
void | SetCurrState (unsigned int state) |
unsigned int | GetCurrState (void) const |
void | SetNextState (unsigned int nextState) |
unsigned int | GetNextState (void) const |
const StateSet & | GetStates (void) const |
const EventMap & | GetEvents (void) const |
const TransitionList & | GetTransitions (void) const |
bool | Update (unsigned int eventType, void *pEventData) |
bool | IsValidState (unsigned int state) const |
bool | IsValidEvent (unsigned int eventType) const |
virtual bool | IsDone (void) const |
![]() | |
virtual | ~INetSession () |
Private Member Functions | |
NONCOPYABLE (CNetServerSession) | |
Private Attributes | |
CNetServerWorker & | m_Server |
CNetFileTransferer | m_FileTransferer |
ENetPeer * | m_Peer |
CStr | m_GUID |
CStrW | m_UserName |
u32 | m_HostID |
The server's end of a network session.
Represents an abstraction of the state of the client, storing all the per-client data needed by the server.
Thread-safety:
Definition at line 107 of file NetSession.h.
CNetServerSession::CNetServerSession | ( | CNetServerWorker & | server, |
ENetPeer * | peer | ||
) |
Definition at line 173 of file NetSession.cpp.
void CNetServerSession::Disconnect | ( | u32 | reason | ) |
Sends a disconnection notification to the client, and sends a NMT_CONNECTION_LOST message to the session FSM.
The server will receive a disconnection notification after a while. The server will not receive any further messages sent via this session.
Definition at line 178 of file NetSession.cpp.
void CNetServerSession::DisconnectNow | ( | u32 | reason | ) |
Sends an unreliable disconnection notification to the client.
The server will not receive any disconnection notification. The server will not receive any further messages sent via this session.
Definition at line 185 of file NetSession.cpp.
|
inline |
Definition at line 145 of file NetSession.h.
|
inline |
Definition at line 116 of file NetSession.h.
|
inline |
Definition at line 122 of file NetSession.h.
|
inline |
Definition at line 114 of file NetSession.h.
|
inline |
Definition at line 119 of file NetSession.h.
|
private |
|
virtual |
Send a message to the client.
Implements INetSession.
Definition at line 190 of file NetSession.cpp.
|
inline |
Definition at line 117 of file NetSession.h.
|
inline |
Definition at line 123 of file NetSession.h.
|
inline |
Definition at line 120 of file NetSession.h.
|
private |
Definition at line 150 of file NetSession.h.
|
private |
Definition at line 154 of file NetSession.h.
|
private |
Definition at line 156 of file NetSession.h.
|
private |
Definition at line 152 of file NetSession.h.
|
private |
Definition at line 148 of file NetSession.h.
|
private |
Definition at line 155 of file NetSession.h.