IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
Loading...
Searching...
No Matches
IRC::ClientControlBlock Class Reference

Control block for management of a client connection and its information. More...

#include <ClientControlBlock.hpp>

Inheritance diagram for IRC::ClientControlBlock:

Public Member Functions

 ClientControlBlock ()
 
SharedPtr< ChannelControlBlockFindChannel (const std::string &ChannelName)
 
- Public Member Functions inherited from IRCCore::FlexibleMemoryPoolingBase< ClientControlBlock >
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, size_t size)
 

Public Attributes

int hSocket
 
sockaddr_in_t Addr
 
std::string Nickname
 
std::string Realname
 
std::string Username
 
std::string ServerPass
 
time_t LastActiveTime
 
bool bRegistered
 
bool bExpired
 Flag that indicate whether the client is expired, and expired client will be released after the remaining messages are sent.
 
bool bSocketClosed
 
std::vector< SharedPtr< MsgBlock > > RecvMsgBlocks
 Received messages from the client.
 
size_t RecvMsgBlockCursor
 A cursor to indicate the next offset to receive in the message block at the front of the RecvMsgBlocks.
 
std::queue< SharedPtr< MsgBlock > > MsgSendingQueue
 Queue of messages to send.
 
size_t SendMsgBlockCursor
 A cursor to indicate the next offset to send in the message block at the front of the MsgSendingQueue.
 
std::map< std::string, SharedPtr< ChannelControlBlock > > Channels
 Map of channel name to the channel control block that the client is connected.
 

Detailed Description

Control block for management of a client connection and its information.

new/delete overrided with memory pool.

Constructor & Destructor Documentation

◆ ClientControlBlock()

IRC::ClientControlBlock::ClientControlBlock ( )
inline

Member Function Documentation

◆ FindChannel()

SharedPtr< ChannelControlBlock > IRC::ClientControlBlock::FindChannel ( const std::string & ChannelName)
inline

Member Data Documentation

◆ hSocket

int IRC::ClientControlBlock::hSocket

◆ Addr

sockaddr_in_t IRC::ClientControlBlock::Addr

◆ Nickname

std::string IRC::ClientControlBlock::Nickname

◆ Realname

std::string IRC::ClientControlBlock::Realname

◆ Username

std::string IRC::ClientControlBlock::Username

◆ ServerPass

std::string IRC::ClientControlBlock::ServerPass

◆ LastActiveTime

time_t IRC::ClientControlBlock::LastActiveTime

◆ bRegistered

bool IRC::ClientControlBlock::bRegistered

◆ bExpired

bool IRC::ClientControlBlock::bExpired

Flag that indicate whether the client is expired, and expired client will be released after the remaining messages are sent.

◆ bSocketClosed

bool IRC::ClientControlBlock::bSocketClosed

◆ RecvMsgBlocks

std::vector< SharedPtr< MsgBlock > > IRC::ClientControlBlock::RecvMsgBlocks

Received messages from the client.

Each message block is not a separate message. It can be a part of a message or a multiple messages.

◆ RecvMsgBlockCursor

size_t IRC::ClientControlBlock::RecvMsgBlockCursor

A cursor to indicate the next offset to receive in the message block at the front of the RecvMsgBlocks.

◆ MsgSendingQueue

std::queue< SharedPtr< MsgBlock > > IRC::ClientControlBlock::MsgSendingQueue

Queue of messages to send.

Note
Do not modify the message block in the queue.

◆ SendMsgBlockCursor

size_t IRC::ClientControlBlock::SendMsgBlockCursor

A cursor to indicate the next offset to send in the message block at the front of the MsgSendingQueue.

◆ Channels

std::map< std::string, SharedPtr< ChannelControlBlock > > IRC::ClientControlBlock::Channels

Map of channel name to the channel control block that the client is connected.


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