C++ Actor Framework 1.0.0
|
Bundles protocol-independent, generic member functions for (almost all) lower layers. More...
#include <generic_lower_layer.hpp>
Public Member Functions | |
multiplexer & | mpx () noexcept |
Returns the multiplexer instance that executes this protocol stack. | |
virtual socket_manager * | manager () noexcept=0 |
Returns the manager that owns this layer. | |
virtual bool | can_send_more () const noexcept=0 |
Queries whether the output device can accept more data straight away. | |
virtual bool | is_reading () const noexcept=0 |
Queries whether the lower layer is currently reading from its input device. | |
virtual void | write_later ()=0 |
Triggers a write callback after the write device signals downstream capacity. | |
virtual void | shutdown ()=0 |
Shuts down any connection or session gracefully. | |
virtual void | shutdown (const error &reason) |
Shuts down any connection or session due to an error. | |
Bundles protocol-independent, generic member functions for (almost all) lower layers.
|
nodiscardpure virtualnoexcept |
Queries whether the lower layer is currently reading from its input device.
Implemented in caf::net::octet_stream::lower_layer.
|
pure virtual |
Shuts down any connection or session gracefully.
Any pending data gets flushed before closing the socket.
Implemented in caf::net::web_socket::lower_layer.
|
virtual |
Shuts down any connection or session due to an error.
Any pending data gets flushed before closing the socket. Protocols with a dedicated closing handshake such as WebSocket may send the close reason to the peer.
Reimplemented in caf::net::web_socket::lower_layer.
|
pure virtual |
Triggers a write callback after the write device signals downstream capacity.
Does nothing if this layer is already writing.