Crate swimos_http

Crate swimos_http 

Source
Expand description

§Ratchet Hyper Integration

An adapter to allow upgrading a Hyper HTTP connection to a websocket connection, using Ratchet.

Structs§

NoUnwrap
Implementation of SockUnwrap that does not unwrap the socket.
Upgrade
WebSocket upgrade parts used for initialising the connection.
UpgradeFuture
A future that performs a websocket upgrade, unwraps the upgraded socket and creates a Ratchet WebSocket from it.

Enums§

UpgradeStatus
Represents the status of an upgrade attempt during a WebSocket negotiation.

Traits§

SockUnwrap
Trait for unwrapping the concrete type of an upgraded socket. Upon a connection upgrade, hyper returns the upgraded socket indirected through a trait object. The caller will generally know the real underlying type and this allows for that type to be restored.

Functions§

fail_upgrade
Produce a bad request response for a bad websocket upgrade request.
negotiate_upgrade
Attempt to negotiate a websocket upgrade on a hyper request. If [Ok(None)] is returned, no upgrade was requested. If an error is returned an upgrade was requested but it failed.
upgrade
Upgrade a hyper request to a websocket, based on a successful negotiation.