Type Alias trillium::Upgrade

source ·
pub type Upgrade = Upgrade<BoxedTransport>;
Expand description

A HTTP protocol upgrade

This exists to erase the generic transport for convenience using a BoxedTransport. See Upgrade for additional documentation

Aliased Type§

struct Upgrade {
    pub request_headers: Headers,
    pub path: String,
    pub method: Method,
    pub state: StateSet,
    pub transport: BoxedTransport,
    pub buffer: Option<Vec<u8>>,
    pub stopper: Stopper,
}

Fields§

§request_headers: Headers

The http request headers

§path: String

The request path

§method: Method

The http request method

§state: StateSet

Any state that has been accumulated on the Conn before negotiating the upgrade

§transport: BoxedTransport

The underlying io (often a TcpStream or similar)

§buffer: Option<Vec<u8>>

Any bytes that have been read from the underlying tcpstream already. It is your responsibility to process these bytes before reading directly from the transport.

§stopper: Stopper

A [Stopper] which can and should be used to gracefully shut down any long running streams or futures associated with this upgrade