Pyrogenesis
trunk
|
The client end of a network session. More...
#include <NetSession.h>
Public Member Functions | |
CNetClientSession (CNetClient &client) | |
~CNetClientSession () | |
bool | Connect (const CStr &server, const u16 port, const bool isLocalClient) |
void | Poll () |
Process queued incoming messages. More... | |
void | Flush () |
Flush queued outgoing network messages. More... | |
void | Disconnect (u32 reason) |
Disconnect from the server. More... | |
virtual bool | SendMessage (const CNetMessage *message) |
Send a message to the server. More... | |
u32 | GetLastReceivedTime () const |
Number of milliseconds since the most recent packet of the server was received. More... | |
u32 | GetMeanRTT () const |
Average round trip time to the server. More... | |
CNetFileTransferer & | GetFileTransferer () |
Public Member Functions inherited from INetSession | |
virtual | ~INetSession () |
Private Member Functions | |
NONCOPYABLE (CNetClientSession) | |
Private Attributes | |
CNetClient & | m_Client |
CNetFileTransferer | m_FileTransferer |
ENetHost * | m_Host |
ENetPeer * | m_Server |
CNetStatsTable * | m_Stats |
The client end of a network session.
Provides an abstraction of the network interface, allowing communication with the server.
CNetClientSession::CNetClientSession | ( | CNetClient & | client | ) |
CNetClientSession::~CNetClientSession | ( | ) |
bool CNetClientSession::Connect | ( | const CStr & | server, |
const u16 | port, | ||
const bool | isLocalClient | ||
) |
void CNetClientSession::Disconnect | ( | u32 | reason | ) |
Disconnect from the server.
Sends a disconnection notification to the server.
void CNetClientSession::Flush | ( | ) |
Flush queued outgoing network messages.
|
inline |
u32 CNetClientSession::GetLastReceivedTime | ( | ) | const |
Number of milliseconds since the most recent packet of the server was received.
u32 CNetClientSession::GetMeanRTT | ( | ) | const |
Average round trip time to the server.
|
private |
void CNetClientSession::Poll | ( | ) |
Process queued incoming messages.
|
virtual |
Send a message to the server.
Implements INetSession.
|
private |
|
private |
|
private |
|
private |
|
private |