Adbase
Adinf C++ base library V2
adbase::TcpWorker Class Reference

#include <TcpWorker.hpp>

Public Member Functions

 TcpWorker (int pipe, Queue< ConnectionBaseInfo > *queue, int threadId, std::string &serverName)
 
 ~TcpWorker ()
 
void start ()
 
void setConnectionCallback (const ConnectionCallback &cb)
 
void setMessageCallback (const MessageCallback &cb)
 
void setWriteCompleteCallback (const WriteCompleteCallback &cb)
 
void setCloseCallback (const CloseCallback &cb)
 
int getWorkerId ()
 
std::string getServerName ()
 
size_t getConnectionNum ()
 
void removeConnection (int connId)
 
std::string connectionCookiePrefix ()
 
void pipeHandler ()
 

Detailed Description

Definition at line 24 of file TcpWorker.hpp.

Constructor & Destructor Documentation

adbase::TcpWorker::TcpWorker ( int  pipe,
Queue< ConnectionBaseInfo > *  queue,
int  threadId,
std::string &  serverName 
)

Definition at line 23 of file TcpWorker.cpp.

adbase::TcpWorker::~TcpWorker ( )

Definition at line 36 of file TcpWorker.cpp.

Member Function Documentation

std::string adbase::TcpWorker::connectionCookiePrefix ( )

Definition at line 113 of file TcpWorker.cpp.

References getServerName(), and getWorkerId().

Referenced by pipeHandler().

size_t adbase::TcpWorker::getConnectionNum ( )
inline

Definition at line 50 of file TcpWorker.hpp.

References adbase::detail::pipeHandler().

std::string adbase::TcpWorker::getServerName ( )
inline

Definition at line 46 of file TcpWorker.hpp.

Referenced by connectionCookiePrefix().

int adbase::TcpWorker::getWorkerId ( )
inline

Definition at line 42 of file TcpWorker.hpp.

Referenced by connectionCookiePrefix().

void adbase::TcpWorker::removeConnection ( int  connId)

Definition at line 102 of file TcpWorker.cpp.

References LOG_DEBUG.

Referenced by pipeHandler().

void adbase::TcpWorker::setCloseCallback ( const CloseCallback cb)
inline

Definition at line 38 of file TcpWorker.hpp.

Referenced by adbase::TcpServer::threadFunc().

void adbase::TcpWorker::setConnectionCallback ( const ConnectionCallback cb)
inline

Definition at line 29 of file TcpWorker.hpp.

Referenced by adbase::TcpServer::threadFunc().

void adbase::TcpWorker::setMessageCallback ( const MessageCallback cb)
inline

Definition at line 32 of file TcpWorker.hpp.

Referenced by adbase::TcpServer::threadFunc().

void adbase::TcpWorker::setWriteCompleteCallback ( const WriteCompleteCallback cb)
inline

Definition at line 35 of file TcpWorker.hpp.

Referenced by adbase::TcpServer::threadFunc().

void adbase::TcpWorker::start ( )

Definition at line 43 of file TcpWorker.cpp.

References LOG_FATAL, LOG_TRACE, and adbase::detail::pipeHandler().

Referenced by adbase::TcpServer::threadFunc().


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