Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CNetClientSession Class Reference

The client end of a network session. More...

#include <NetSession.h>

Inheritance diagram for CNetClientSession:
Inheritance graph
[legend]
Collaboration diagram for CNetClientSession:
Collaboration graph
[legend]

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...
 
CNetFileTransfererGetFileTransferer ()
 
- Public Member Functions inherited from INetSession
virtual ~INetSession ()
 

Private Member Functions

 NONCOPYABLE (CNetClientSession)
 

Private Attributes

CNetClientm_Client
 
CNetFileTransferer m_FileTransferer
 
ENetHostm_Host
 
ENetPeerm_Server
 
CNetStatsTablem_Stats
 

Detailed Description

The client end of a network session.

Provides an abstraction of the network interface, allowing communication with the server.

Constructor & Destructor Documentation

CNetClientSession::CNetClientSession ( CNetClient client)
CNetClientSession::~CNetClientSession ( )

Member Function Documentation

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.

CNetFileTransferer& CNetClientSession::GetFileTransferer ( )
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.

CNetClientSession::NONCOPYABLE ( CNetClientSession  )
private
void CNetClientSession::Poll ( )

Process queued incoming messages.

bool CNetClientSession::SendMessage ( const CNetMessage message)
virtual

Send a message to the server.

Implements INetSession.

Member Data Documentation

CNetClient& CNetClientSession::m_Client
private
CNetFileTransferer CNetClientSession::m_FileTransferer
private
ENetHost* CNetClientSession::m_Host
private
ENetPeer* CNetClientSession::m_Server
private
CNetStatsTable* CNetClientSession::m_Stats
private

The documentation for this class was generated from the following files: