DDraceNetwork Docs
CNetConsole Class Reference

#include <network.h>

Collaboration diagram for CNetConsole:
[legend]

Classes

struct  CSlot
 

Public Member Functions

void SetCallbacks (NETFUNC_NEWCLIENT_CON pfnNewClient, NETFUNC_DELCLIENT pfnDelClient, void *pUser)
 
bool Open (NETADDR BindAddr, CNetBan *pNetBan)
 
int Close ()
 
int Recv (char *pLine, int MaxLength, int *pClientId=nullptr)
 
int Send (int ClientId, const char *pLine)
 
int Update ()
 
int AcceptClient (NETSOCKET Socket, const NETADDR *pAddr)
 
int Drop (int ClientId, const char *pReason)
 
const NETADDRClientAddr (int ClientId) const
 
CNetBanNetBan () const
 

Private Attributes

NETSOCKET m_Socket
 
CNetBanm_pNetBan
 
CSlot m_aSlots [NET_MAX_CONSOLE_CLIENTS]
 
NETFUNC_NEWCLIENT_CON m_pfnNewClient
 
NETFUNC_DELCLIENT m_pfnDelClient
 
void * m_pUser
 
CNetRecvUnpacker m_RecvUnpacker
 

Member Function Documentation

◆ AcceptClient()

int CNetConsole::AcceptClient ( NETSOCKET  Socket,
const NETADDR pAddr 
)

◆ ClientAddr()

const NETADDR * CNetConsole::ClientAddr ( int  ClientId) const
inline

◆ Close()

int CNetConsole::Close ( )

◆ Drop()

int CNetConsole::Drop ( int  ClientId,
const char *  pReason 
)

◆ NetBan()

CNetBan * CNetConsole::NetBan ( ) const
inline

◆ Open()

bool CNetConsole::Open ( NETADDR  BindAddr,
CNetBan pNetBan 
)

◆ Recv()

int CNetConsole::Recv ( char *  pLine,
int  MaxLength,
int *  pClientId = nullptr 
)

◆ Send()

int CNetConsole::Send ( int  ClientId,
const char *  pLine 
)

◆ SetCallbacks()

void CNetConsole::SetCallbacks ( NETFUNC_NEWCLIENT_CON  pfnNewClient,
NETFUNC_DELCLIENT  pfnDelClient,
void *  pUser 
)

◆ Update()

int CNetConsole::Update ( )

Member Data Documentation

◆ m_aSlots

CSlot CNetConsole::m_aSlots[NET_MAX_CONSOLE_CLIENTS]
private

◆ m_pfnDelClient

NETFUNC_DELCLIENT CNetConsole::m_pfnDelClient
private

◆ m_pfnNewClient

NETFUNC_NEWCLIENT_CON CNetConsole::m_pfnNewClient
private

◆ m_pNetBan

CNetBan* CNetConsole::m_pNetBan
private

◆ m_pUser

void* CNetConsole::m_pUser
private

◆ m_RecvUnpacker

CNetRecvUnpacker CNetConsole::m_RecvUnpacker
private

◆ m_Socket

NETSOCKET CNetConsole::m_Socket
private

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