|
libcaf
0.14.4
|
An acceptor is responsible for accepting incoming connections. More...
#include <default_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. | |
| using | socket_type = typename SocketAcceptor::socket_type |
| 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 | |
| acceptor (asio_multiplexer &am, io_backend &io) | |
| asio_multiplexer & | backend () |
Returns the multiplexer this acceptor belongs to. | |
| SocketAcceptor & | socket_handle () |
| Returns the IO socket. | |
| const SocketAcceptor & | socket_handle () const |
| socket_type & | accepted_socket () |
| Returns the accepted socket. More... | |
| void | init (SocketAcceptor fd) |
Initializes this acceptor, setting the socket handle to fd. | |
| void | start (const manager_ptr &mgr) |
Starts this acceptor, forwarding all incoming connections to manager. More... | |
| void | stop () |
| Closes the network connection, thus stopping this acceptor. | |
| acceptor (default_multiplexer &backend_ref) | |
| SocketAcceptor & | socket_handle () |
| Returns the IO socket. | |
| socket_type & | accepted_socket () |
| Returns the accepted socket. More... | |
| void | init (SocketAcceptor sock) |
Initializes this acceptor, setting the socket handle to fd. | |
| void | start (const manager_ptr &mgr) |
Starts this acceptor, forwarding all incoming connections to manager. More... | |
| void | stop_reading () |
| Closes the network connection, thus stopping this acceptor. | |
| void | handle_event (operation op) override |
| Returns true once the requested operation is done, i.e., to signalize the multiplexer to remove this handler. More... | |
| void | removed_from_loop (operation op) override |
Callback to signalize that this handler has been removed from the event loop for operations of type op. More... | |
| native_socket | fd () const override |
| Returns the native socket handle for this handler. | |
Public Member Functions inherited from caf::io::network::event_handler | |
| event_handler (default_multiplexer &dm) | |
| default_multiplexer & | backend () |
Returns the multiplexer this acceptor belongs to. | |
| int | eventbf () const |
| Returns the bit field storing the subscribed events. | |
| void | eventbf (int value) |
| Sets the bit field storing the subscribed events. | |
Additional Inherited Members | |
Protected Attributes inherited from caf::io::network::event_handler | |
| default_multiplexer & | backend_ |
| int | eventbf_ |
An acceptor is responsible for accepting incoming connections.
| socket_type& caf::io::network::acceptor< SocketAcceptor >::accepted_socket | ( | ) |
Returns the accepted socket.
This member function should be called only from the new_connection callback.
| socket_type& caf::io::network::acceptor< SocketAcceptor >::accepted_socket | ( | ) |
Returns the accepted socket.
This member function should be called only from the new_connection callback.
|
overridevirtual |
Returns true once the requested operation is done, i.e., to signalize the multiplexer to remove this handler.
The handler remains in the event loop as long as it returns false.
Implements caf::io::network::event_handler.
|
overridevirtual |
Callback to signalize that this handler has been removed from the event loop for operations of type op.
Implements caf::io::network::event_handler.
| void caf::io::network::acceptor< SocketAcceptor >::start | ( | const manager_ptr & | 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.
| void caf::io::network::acceptor< SocketAcceptor >::start | ( | const manager_ptr & | 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.9.1