C++ Actor Framework 0.19
Loading...
Searching...
No Matches
Public Member Functions | List of all members
caf::net::generic_lower_layer Class Referenceabstract

Bundles protocol-independent, generic member functions for (almost all) lower layers. More...

#include <generic_lower_layer.hpp>

Inheritance diagram for caf::net::generic_lower_layer:
caf::net::http::lower_layer caf::net::lp::lower_layer caf::net::octet_stream::lower_layer caf::net::web_socket::lower_layer caf::net::http::server caf::net::lp::framing caf::net::web_socket::framing

Public Member Functions

virtual multiplexermpx () noexcept=0
 Returns the multiplexer instance that executes this protocol stack.
 
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 du to an error.
 

Detailed Description

Bundles protocol-independent, generic member functions for (almost all) lower layers.

Member Function Documentation

◆ can_send_more()

virtual bool caf::net::generic_lower_layer::can_send_more ( ) const
pure virtualnoexcept

Queries whether the output device can accept more data straight away.

Implemented in caf::net::http::server, caf::net::lp::framing, and caf::net::web_socket::framing.

◆ is_reading()

virtual bool caf::net::generic_lower_layer::is_reading ( ) const
pure virtualnoexcept

Queries whether the lower layer is currently reading from its input device.

Implemented in caf::net::http::server, caf::net::lp::framing, caf::net::web_socket::framing, and caf::net::octet_stream::lower_layer.

◆ mpx()

virtual multiplexer & caf::net::generic_lower_layer::mpx ( )
pure virtualnoexcept

Returns the multiplexer instance that executes this protocol stack.

Implemented in caf::net::http::server, caf::net::lp::framing, and caf::net::web_socket::framing.

◆ shutdown() [1/2]

virtual void caf::net::generic_lower_layer::shutdown ( )
pure virtual

Shuts down any connection or session gracefully.

Any pending data gets flushed before closing the socket.

Implemented in caf::net::http::server, caf::net::lp::framing, and caf::net::web_socket::lower_layer.

◆ shutdown() [2/2]

virtual void caf::net::generic_lower_layer::shutdown ( const error reason)
virtual

Shuts down any connection or session du 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.

◆ write_later()

virtual void caf::net::generic_lower_layer::write_later ( )
pure virtual

Triggers a write callback after the write device signals downstream capacity.

Does nothing if this layer is already writing.

Implemented in caf::net::http::server, caf::net::lp::framing, and caf::net::web_socket::framing.


The documentation for this class was generated from the following file: