|
libcaf
0.15.5
|
An acceptor is responsible for accepting incoming connections. More...
#include <asio_multiplexer.hpp>
Public Types | |
| using | manager_type = acceptor_manager |
A manager providing the accept member function. | |
| using | manager_ptr = intrusive_ptr< manager_type > |
| A smart pointer to an acceptor manager. | |
Public Member Functions | |
| asio_acceptor (asio_multiplexer &am, io_service &io) | |
| asio_multiplexer & | backend () |
Returns the multiplexer this acceptor belongs to. | |
| SocketAcceptor & | socket_handle () |
| Returns the IO socket. | |
| const SocketAcceptor & | socket_handle () const |
| Returns the IO socket. | |
| socket_type & | accepted_socket () |
| Returns the accepted socket. More... | |
| void | init (SocketAcceptor fd) |
Initializes this acceptor, setting the socket handle to fd. | |
| void | start (manager_type *mgr) |
Starts this acceptor, forwarding all incoming connections to manager. More... | |
| void | activate (manager_type *mgr) |
| Starts the accept loop. | |
| void | passivate () |
| Starts the accept loop. | |
| void | stop () |
| Closes the network connection, thus stopping this acceptor. | |
An acceptor is responsible for accepting incoming connections.
| socket_type& caf::io::network::asio_acceptor< SocketAcceptor >::accepted_socket | ( | ) |
Returns the accepted socket.
This member function should be called only from the new_connection callback.
| void caf::io::network::asio_acceptor< SocketAcceptor >::start | ( | manager_type * | mgr | ) |
Starts this acceptor, forwarding all incoming connections to manager.
The intrusive pointer will be released after the acceptor has been closed or an IO error occured.
1.8.14