Struct solicit::http::client::ClientConnection [] [src]

pub struct ClientConnection<S, R, State = DefaultSessionState<DefaultStream>> where S: SendFrame, R: ReceiveFrame, State: SessionState {
    pub state: State,
    // some fields omitted
}

The struct extends the HttpConnection API with client-specific methods (such as start_request) and wires the HttpConnection to the client Session callbacks.

Fields

The state of the session associated to this client connection. Maintains the status of the connection streams.

Methods

impl<S, R, State> ClientConnection<S, R, State> where S: SendFrame, R: ReceiveFrame, State: SessionState
[src]

Creates a new ClientConnection that will use the given HttpConnection for all its underlying HTTP/2 communication.

The given state instance will handle the maintenance of the session's state.

Returns the scheme of the underlying HttpConnection.

Performs the initialization of the ClientConnection.

This means that it expects the next frame that it receives to be the server preface -- i.e. a SETTINGS frame. Returns an HttpError if this is not the case.

Starts a new request based on the given RequestStream.

For now it does not perform any validation whether the given RequestStream is valid.

Fully handles the next incoming frame. Events are passed on to the internal session instance.

Queues a new DATA frame onto the underlying SendFrame.

Currently, no prioritization of streams is taken into account and which stream's data is queued cannot be relied on.