[][src]Module solicit::http::connection

The module contains the implementation of an HTTP/2 connection.

This provides an API to read and write raw HTTP/2 frames, as well as a way to hook into higher-level events arising on an HTTP/2 connection, such as the receipt of headers on a particular stream or a new data chunk.

The SendFrame and ReceiveFrame traits are the API to sending and receiving frames off of an HTTP/2 connection. The module includes default implementations of those traits for io::Write and solicit::http::transport::TransportStream types.

The HttpConnection struct builds on top of these traits and provides an API for sending messages of a higher level to the peer (such as writing data or headers, while automatically handling the framing and header encoding), as well as for handling incoming events of that type. The Session trait is the bridge between the connection layer (i.e. the HttpConnection) and the higher layers that handle these events and pass them on to the application.

Structs

DataChunk

The struct represents a chunk of data that should be sent to the peer on a particular stream.

HttpConnection

The struct implements the HTTP/2 connection level logic.

HttpConnectionSender

The struct represents an HttpConnection that has been bound to a SendFrame reference, allowing it to send frames. It exposes convenience methods for various send operations that can be invoked on the underlying stream. The methods prepare the appropriate frames and queue their sending on the referenced SendFrame instance.

Enums

EndStream

An enum indicating whether the HttpConnection send operation should end the stream.

HttpFrame

An enum representing all frame variants that can be returned by an HttpConnection can handle.

SendStatus

The enum represents the success status of the operation of sending a next data chunk on an HTTP/2 connection.

Traits

ReceiveFrame

A trait that should be implemented by types that can provide the functionality of receiving HTTP/2 frames.

SendFrame

A trait that should be implemented by types that can provide the functionality of sending HTTP/2 frames.