[][src]Struct solicit::http::server::ServerConnection

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

The struct provides a more convenient API for server-related functionality of an HTTP/2 connection, such as sending a response back to the client.

Fields

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

Methods

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

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

Returns the scheme of the underlying HttpConnection.

Initializes the ServerConnection by sending the server's settings and processing the client's. If the client does not provide a settings frame, returns an error.

TODO This method should eventually be split into two.

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

Starts a response on the stream with the given ID by sending the given headers.

The body of the response is assumed to be provided by the Stream instance stored within the connection's state. (The body does not have to be ready when this method is called, as long as the Stream instance knows how to provide it to the connection later on.)

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.

Auto Trait Implementations

impl<S, R, State> Send for ServerConnection<S, R, State> where
    R: Send,
    S: Send,
    State: Send

impl<S, R, State> Sync for ServerConnection<S, R, State> where
    R: Sync,
    S: Sync,
    State: Sync

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more