C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
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::lp::framing caf::net::web_socket::framing

Public Member Functions

multiplexermpx () noexcept
 Returns the multiplexer instance that executes this protocol stack.
 
virtual socket_managermanager () 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.
 

Detailed Description

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

Member Function Documentation

◆ is_reading()

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

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

Implemented in caf::net::octet_stream::lower_layer.

◆ 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::web_socket::lower_layer.

◆ shutdown() [2/2]

void caf::net::generic_lower_layer::shutdown ( const error & reason)
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.

◆ 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.


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