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

Operates on HTTP requests. More...

#include <upper_layer.hpp>

Inheritance diagram for caf::net::http::upper_layer:
caf::net::generic_upper_layer caf::net::http::router

Public Member Functions

virtual error start (lower_layer *down)=0
 Initializes the upper layer.
 
virtual ptrdiff_t consume (const request_header &hdr, const_byte_span payload)=0
 Consumes an HTTP message.
 
- Public Member Functions inherited from caf::net::generic_upper_layer
virtual void prepare_send ()=0
 Gives the upper layer an opportunity to add additional data to the output buffer.
 
virtual bool done_sending ()=0
 Queries whether all pending data has been sent.
 
virtual void abort (const error &reason)=0
 Called by the lower layer for cleaning up any state in case of an error or when disposed.
 

Detailed Description

Operates on HTTP requests.

Member Function Documentation

◆ consume()

virtual ptrdiff_t caf::net::http::upper_layer::consume ( const request_header hdr,
const_byte_span  payload 
)
pure virtual

Consumes an HTTP message.

Parameters
hdrThe header fields for the received message.
payloadThe payload of the received message.
Returns
The number of consumed bytes or a negative value to signal an error.
Note
Discarded data is lost permanently.

Implemented in caf::net::http::router.

◆ start()

virtual error caf::net::http::upper_layer::start ( lower_layer down)
pure virtual

Initializes the upper layer.

Parameters
downA pointer to the lower layer that remains valid for the lifetime of the upper layer.

Implemented in caf::net::http::router.


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