Struct httpbis::solicit::connection::HttpConnection [] [src]

pub struct HttpConnection {
    pub decoder: Decoder<'static>,
    pub encoder: Encoder<'static>,
    pub out_window_size: WindowSize,
    pub in_window_size: WindowSize,
    pub scheme: HttpScheme,
}

The struct implements the HTTP/2 connection level logic.

This means that the struct is a bridge between the low level raw frame reads/writes (i.e. what the SendFrame and ReceiveFrame traits do) and the higher session-level logic.

Therefore, it provides an API that exposes higher-level write operations, such as writing headers or data, that take care of all the underlying frame construction that is required.

Similarly, it provides an API for handling events that arise from receiving frames, without requiring the higher level to directly look at the frames themselves, rather only the semantic content within the frames.

Fields

HPACK decoder used to decode incoming headers before passing them on to the session.

The HPACK encoder used to encode headers before sending them on this connection.

Tracks the size of the outbound flow control window

Tracks the size of the inbound flow control window

The scheme of the connection

Methods

impl HttpConnection
[src]

Creates a new HttpConnection that will use the given sender for writing frames.

Creates a new HttpConnectionSender instance that will use the given SendFrame instance to send the frames that it prepares. This is a convenience struct so that clients do not have to pass the same sender reference to multiple send methods. ```

Returns the current size of the inbound flow control window (i.e. the number of octets that the connection will accept and the peer will send at most, unless the window is updated).

Returns the current size of the outbound flow control window (i.e. the number of octets that can be sent on the connection to the peer without violating flow control).

Internal helper method that decreases the outbound flow control window size.

Internal helper method that decreases the inbound flow control window size.

Trait Implementations

impl HttpConnectionEx for HttpConnection
[src]