|
C++ Actor Framework 0.19
|
Accepts incoming clients with an Acceptor and handles them via a connection factory. More...
#include <accept_handler.hpp>
Public Types | |
| using | socket_type = net::socket |
| using | transport_type = typename Acceptor::transport_type |
| using | connection_handle = typename transport_type::connection_handle |
| using | factory_type = connection_factory< connection_handle > |
| using | factory_ptr = detail::connection_factory_ptr< connection_handle > |
Public Member Functions | |
| accept_handler (Acceptor acc, factory_ptr fptr, size_t max_connections, std::vector< strong_actor_ptr > monitored_actors={}) | |
| error | start (net::socket_manager *owner) override |
| Starts processing on this layer. | |
| net::socket | handle () const override |
| Returns the handle for the managed socket. | |
| void | handle_read_event () override |
| Handles a read event on the managed socket. | |
| void | handle_write_event () override |
| Handles a write event on the managed socket. | |
| void | abort (const error &reason) override |
| Called on socket errors or when the manager gets disposed. | |
| void | self_ref (disposable ref) |
Public Member Functions inherited from caf::net::socket_event_layer | |
| virtual error | start (socket_manager *owner)=0 |
| Starts processing on this layer. | |
| virtual socket | handle () const =0 |
| Returns the handle for the managed socket. | |
| virtual void | handle_read_event ()=0 |
| Handles a read event on the managed socket. | |
| virtual void | handle_write_event ()=0 |
| Handles a write event on the managed socket. | |
| virtual bool | do_handover (std::unique_ptr< socket_event_layer > &next) |
Called after returning handover from a read or write handler. | |
| virtual void | abort (const error &reason)=0 |
| Called on socket errors or when the manager gets disposed. | |
| virtual bool | finalized () const noexcept |
| Queries whether the object can be safely discarded after calling abort on it, e.g., that pending data has been written. | |
Static Public Member Functions | |
| static std::unique_ptr< accept_handler > | make (Acceptor acc, factory_ptr fptr, size_t max_connections, std::vector< strong_actor_ptr > monitored_actors={}) |
Accepts incoming clients with an Acceptor and handles them via a connection factory.
|
overridevirtual |
Called on socket errors or when the manager gets disposed.
Implements caf::net::socket_event_layer.
|
overridevirtual |
Returns the handle for the managed socket.
Implements caf::net::socket_event_layer.
|
overridevirtual |
Handles a read event on the managed socket.
Implements caf::net::socket_event_layer.
|
overridevirtual |
Handles a write event on the managed socket.
Implements caf::net::socket_event_layer.
|
overridevirtual |
Starts processing on this layer.
Implements caf::net::socket_event_layer.