Skip to main content

Module ws

Module ws 

Source
Expand description

WebSockets protocol support

Re-exports§

pub use crate::ws::CloseCode;
pub use crate::ws::CloseReason;
pub use crate::ws::Frame;
pub use crate::ws::Message;
pub use crate::ws::WsSink;

Functions§

start
Start websocket service handling Frame messages with automatic control/stop logic, including the chosen subprotocol in the response.
start_with
Start websocket service handling raw DispatchItem messages requiring manual control/stop logic, including the chosen subprotocol in the response.
subprotocols
Returns an iterator over the subprotocols requested by the client in the Sec-Websocket-Protocol header.