基础类
TAtomicInt32
原子操作的int32
Socket类
TPipe
一个socket+linux pipe的封装
TSocketAction
双向链表的结构
有一个指向TSocketReactor的成员
TTimeoutControl
TSocketReactor
有一个TCmdSocketAction用于进程间通信
class TCmdSocketAction : public TSocketAction
{
public:
TCmdSocketAction(TSocketReactor * pParent) : TSocketAction(pParent),m_nSenderCount(0) {}
~TCmdSocketAction(void) {}
void init(void);
void signal(CMD_CODE cmd);
protected:
TPipe m_nPipe;
TAtomicInt32 m_nSenderCount;
};
TSimpleReactor
template<class typeListener,class typeSelector>
class TSimpleReactor : public TSocketReactor
typeSelector : 就是一个select、epoll等I/O event notification mechanism
typeListener:是一个TSocketAction
Loading Comments...