1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! WebSocket protocol support.
//!
//! Use [`handshake()`] or [`handshake_response()`] to perform a server-side
//! opening handshake, and [`WsClient`] to establish a client connection.
//!
//! Framed communication uses [`Codec`] to encode and decode [`Frame`]s and
//! [`Message`]s. On the client side, [`WsConnection::start()`] runs a frame
//! handling service, [`WsConnection::receiver()`] returns a stream of frames,
//! and [`WsConnection::sink()`] returns a [`WsSink`] for sending messages.
//!
//! [`WsTransport`] is a byte-stream filter instead: binary and continuation
//! frames are exposed as raw bytes, text frames are rejected, and control
//! frames are handled internally. Use [`WsConnection::into_transport()`] to
//! run a byte-oriented protocol over a WebSocket connection.
//!
//! With the `compress` feature, the client can negotiate the
//! `permessage-deflate` extension (RFC 7692), see
//! [`WsClientConfig::set_deflate()`]. The server accepts it with
//! [`DeflateConfig::negotiate()`], or with
//! [`HttpServiceConfig::set_ws_deflate()`](crate::http::HttpServiceConfig::set_ws_deflate)
//! for [`web::ws::start()`](crate::web::ws::start).
pub use WsClientConfig;
pub use ;
pub use ;
pub use DeflateConfig;
pub use Parser;
pub use ;
pub use ;
pub use WsSink;
pub use ;
pub use is_token;