//! WebSocket support (RFC 6455). //! //! v0.4 chunk 1: the upgrade handshake. A handler that wants to speak //! WebSocket calls [`Conn::upgrade`](crate::Conn::upgrade); on a valid //! handshake the connection actor writes the `101 Switching Protocols` //! response and leaves the HTTP request loop. (Until the duplex wiring //! lands — chunk 3 — leaving the loop closes the socket; the 101 itself //! is correct and tested.) //! //! Dependency note: SHA-1 comes from `sha1_smol` (zero transitive deps), //! spending urus dependency slot #3 — agreed in the v0.4 design pass over //! vendoring. Base64 here is the 20-byte *encode* direction only and is //! not cryptographic, so that stays in-tree (`handshake::b64`). pub mod handshake; pub use handshake::Rejection; /// Marker carried on a [`Conn`](crate::Conn) whose handler accepted a /// WebSocket upgrade. Opaque: chunk 3 grows this into the handler/duplex /// handoff payload, so nothing outside the crate should depend on its /// shape. #[derive(Debug)] pub struct WsUpgrade { pub(crate) _priv: (), }