Adbase
Adinf C++ base library V2
|
#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 () |
Definition at line 24 of file TcpWorker.hpp.
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.
std::string adbase::TcpWorker::connectionCookiePrefix | ( | ) |
Definition at line 113 of file TcpWorker.cpp.
References getServerName(), and getWorkerId().
Referenced by pipeHandler().
|
inline |
Definition at line 50 of file TcpWorker.hpp.
References adbase::detail::pipeHandler().
|
inline |
Definition at line 46 of file TcpWorker.hpp.
Referenced by connectionCookiePrefix().
|
inline |
Definition at line 42 of file TcpWorker.hpp.
Referenced by connectionCookiePrefix().
void adbase::TcpWorker::pipeHandler | ( | ) |
Definition at line 58 of file TcpWorker.cpp.
References connectionCookiePrefix(), adbase::ConnectionBaseInfo::connfd, adbase::ConnectionBaseInfo::localAddress, LOG_ERROR, LOG_TRACE, adbase::ConnectionBaseInfo::peerAddress, and removeConnection().
Referenced by adbase::detail::pipeHandler().
void adbase::TcpWorker::removeConnection | ( | int | connId | ) |
|
inline |
Definition at line 38 of file TcpWorker.hpp.
Referenced by adbase::TcpServer::threadFunc().
|
inline |
Definition at line 29 of file TcpWorker.hpp.
Referenced by adbase::TcpServer::threadFunc().
|
inline |
Definition at line 32 of file TcpWorker.hpp.
Referenced by adbase::TcpServer::threadFunc().
|
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().