IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
|
Control block for management of a client connection and its information. More...
#include <ClientControlBlock.hpp>
Public Member Functions | |
ClientControlBlock () | |
SharedPtr< ChannelControlBlock > | FindChannel (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. | |
Control block for management of a client connection and its information.
new/delete overrided with memory pool.
|
inline |
|
inline |
int IRC::ClientControlBlock::hSocket |
sockaddr_in_t IRC::ClientControlBlock::Addr |
std::string IRC::ClientControlBlock::Nickname |
std::string IRC::ClientControlBlock::Realname |
std::string IRC::ClientControlBlock::Username |
std::string IRC::ClientControlBlock::ServerPass |
time_t IRC::ClientControlBlock::LastActiveTime |
bool IRC::ClientControlBlock::bRegistered |
bool IRC::ClientControlBlock::bExpired |
Flag that indicate whether the client is expired, and expired client will be released after the remaining messages are sent.
bool IRC::ClientControlBlock::bSocketClosed |
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.
size_t IRC::ClientControlBlock::RecvMsgBlockCursor |
A cursor to indicate the next offset to receive in the message block at the front of the RecvMsgBlocks.
Queue of messages to send.
size_t IRC::ClientControlBlock::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 > > IRC::ClientControlBlock::Channels |
Map of channel name to the channel control block that the client is connected.