irccd
3.0.3
|
Abstract stream acceptor interface. More...
#include <acceptor.hpp>
Public Types | |
using | handler = std::function< void(std::error_code, std::shared_ptr< stream >)> |
Accept completion handler. More... | |
Public Member Functions | |
acceptor ()=default | |
virtual | ~acceptor ()=default |
virtual void | accept (handler handler)=0 |
Abstract stream acceptor interface.
This class is used to wait a new client in an asynchronous manner. Derived classes must implement a non-blocking accept function.
using irccd::acceptor::handler = std::function<void (std::error_code, std::shared_ptr<stream>)> |
Accept completion handler.
|
default |
Default constructor.
|
virtualdefault |
Virtual destructor defaulted.
|
pure virtual |
Start asynchronous accept.
Once the client is accepted, the original acceptor must be kept until it is destroyed.
handler | the handler |
Implemented in irccd::tls_acceptor< SocketAcceptor >, irccd::local_acceptor, and irccd::ip_acceptor.