Wrapper of Channel and Socket, As the entrance of comm. More...
#include <Acceptor.h>
Public Types | |
| using | ConnectionCallback = std::function<void(SOCKET, const InetAddress&)> |
Public Member Functions | |
| Acceptor (const InetAddress &listenAddress, bool reusePort) | |
| Constructor Function. | |
| virtual | ~Acceptor () |
| Destructor Function. | |
| Acceptor (const Acceptor &)=delete | |
| Copy Constructor Function. | |
| Acceptor & | operator= (const Acceptor &)=delete |
| Copy Assignment Operation. | |
| void | SetConnectionCallback (const ConnectionCallback &cb) |
| Set ConnectionCallback. | |
| bool | IsListening () const |
| Determine if this is in listening. @reutrn Returns true if is in listening. | |
| void | Listen () |
| Listen accept socket. | |
Private Member Functions | |
| void | HandleRead () const |
| On Read Event Callback. | |
Private Attributes | |
| Socket | m_AcceptSocket |
| Acceptor Socket. | |
| std::shared_ptr< Channel > | m_AcceptChannel |
| Acceptor Channel. | |
| ConnectionCallback | m_ConnectionCallback |
| ConnectionCallback. | |
| bool | m_IsListening |
| Boolean of whether is in listening. | |
Wrapper of Channel and Socket, As the entrance of comm.
Definition at line 23 of file Acceptor.h.