Expand description
§Ratchet Hyper Integration
An adapter to allow upgrading a Hyper HTTP connection to a websocket connection, using Ratchet.
Structs§
- NoUnwrap
- Implementation of
SockUnwrapthat does not unwrap the socket. - Upgrade
- WebSocket upgrade parts used for initialising the connection.
- Upgrade
Future - A future that performs a websocket upgrade, unwraps the upgraded socket and creates a Ratchet WebSocket from it.
Enums§
- Upgrade
Status - Represents the status of an upgrade attempt during a WebSocket negotiation.
Traits§
- Sock
Unwrap - 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.