18#ifndef NET_SERVER_SESSION_H
19#define NET_SERVER_SESSION_H
Various declarations shared by networking code.
struct _ENetPeer ENetPeer
Definition: NetHost.h:33
NetDisconnectReason
Reasons sent by server to clients in disconnection messages.
Definition: NetHost.h:65
Manages states, events, actions and transitions between states.
Definition: FSM.h:69
Handles transferring files between clients and servers.
Definition: NetFileTransfer.h:53
The base class for all network messages exchanged within the game.
Definition: NetMessage.h:42
The server's end of a network session.
Definition: NetServerSession.h:39
std::uint32_t GetIPAddress() const
Definition: NetServerSession.cpp:33
std::uint32_t GetMeanRTT() const
Average round trip time to the client.
Definition: NetServerSession.cpp:46
void DisconnectNow(NetDisconnectReason reason)
Sends an unreliable disconnection notification to the client.
Definition: NetServerSession.cpp:64
CNetServerSession(CNetServerWorker &server, ENetPeer *peer)
Definition: NetServerSession.cpp:28
std::uint32_t GetHostID() const
Definition: NetServerSession.h:53
CStr m_GUID
Definition: NetServerSession.h:97
void SetHostID(std::uint32_t id)
Definition: NetServerSession.h:54
void Disconnect(NetDisconnectReason reason)
Sends a disconnection notification to the client, and sends a NMT_CONNECTION_LOST message to the sess...
Definition: NetServerSession.cpp:54
std::uint32_t m_HostID
Definition: NetServerSession.h:99
CStrW m_UserName
Definition: NetServerSession.h:98
bool SendMessage(const CNetMessage *message)
Send a message to the client.
Definition: NetServerSession.cpp:72
std::uint32_t GetLastReceivedTime() const
Number of milliseconds since the latest packet of that client was received.
Definition: NetServerSession.cpp:38
ENetPeer * m_Peer
Definition: NetServerSession.h:95
const CStrW & GetUserName() const
Definition: NetServerSession.h:50
CStr m_Password
Definition: NetServerSession.h:100
CNetFileTransferer m_FileTransferer
Definition: NetServerSession.h:93
CNetFileTransferer & GetFileTransferer()
Definition: NetServerSession.h:88
void SetUserName(const CStrW &name)
Definition: NetServerSession.h:51
const CStr & GetGUID() const
Definition: NetServerSession.h:47
void SetGUID(const CStr &guid)
Definition: NetServerSession.h:48
CNetServerWorker & GetServer()
Definition: NetServerSession.h:45
NONCOPYABLE(CNetServerSession)
CNetServerWorker & m_Server
Definition: NetServerSession.h:91
Network server worker thread.
Definition: NetServer.h:113