DDraceNetwork Documentation
Loading...
Searching...
No Matches
CConsoleNetConnection Class Reference

#include <network.h>

Collaboration diagram for CConsoleNetConnection:
[legend]

Public Types

enum class  EState { OFFLINE , ONLINE , ERROR }
 

Public Member Functions

int Init (NETSOCKET Socket, const NETADDR *pAddr)
 
void Disconnect (const char *pReason)
 
EState State () const
 
const NETADDRPeerAddress () const
 
const charErrorString () const
 
void Reset ()
 
int Update ()
 
int Send (const char *pLine)
 
int Recv (char *pLine, int MaxLength)
 

Private Attributes

EState m_State
 
NETADDR m_PeerAddr
 
NETSOCKET m_Socket
 
char m_aBuffer [NET_MAX_PACKETSIZE]
 
int m_BufferOffset
 
char m_aErrorString [256]
 
bool m_LineEndingDetected
 
char m_aLineEnding [3]
 

Member Enumeration Documentation

◆ EState

Enumerator
OFFLINE 
ONLINE 
ERROR 

Member Function Documentation

◆ Disconnect()

void CConsoleNetConnection::Disconnect ( const char pReason)

◆ ErrorString()

const char * CConsoleNetConnection::ErrorString ( ) const
inline

◆ Init()

int CConsoleNetConnection::Init ( NETSOCKET  Socket,
const NETADDR pAddr 
)

◆ PeerAddress()

const NETADDR * CConsoleNetConnection::PeerAddress ( ) const
inline

◆ Recv()

int CConsoleNetConnection::Recv ( char pLine,
int  MaxLength 
)

◆ Reset()

void CConsoleNetConnection::Reset ( )

◆ Send()

int CConsoleNetConnection::Send ( const char pLine)

◆ State()

EState CConsoleNetConnection::State ( ) const
inline

◆ Update()

int CConsoleNetConnection::Update ( )

Member Data Documentation

◆ m_aBuffer

char CConsoleNetConnection::m_aBuffer[NET_MAX_PACKETSIZE]
private

◆ m_aErrorString

char CConsoleNetConnection::m_aErrorString[256]
private

◆ m_aLineEnding

char CConsoleNetConnection::m_aLineEnding[3]
private

◆ m_BufferOffset

int CConsoleNetConnection::m_BufferOffset
private

◆ m_LineEndingDetected

bool CConsoleNetConnection::m_LineEndingDetected
private

◆ m_PeerAddr

NETADDR CConsoleNetConnection::m_PeerAddr
private

◆ m_Socket

NETSOCKET CConsoleNetConnection::m_Socket
private

◆ m_State

EState CConsoleNetConnection::m_State
private

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