Struct salvo_extra::ws::WsHandler [−][src]
pub struct WsHandler { /* fields omitted */ }
Expand description
Creates a Websocket Handler. Request:
- Method must be
GET
- Header
connection
must beupgrade
- Header
upgrade
must bewebsocket
- Header
sec-websocket-version
must be13
- Header
sec-websocket-key
must be set.
Response:
- Status of
101 Switching Protocols
- Header
connection: upgrade
- Header
upgrade: websocket
- Header
sec-websocket-accept
with the hash value of the received key.
Implementations
Create new WsHandler
with config.
Set the size of the internal message send queue.
Set the maximum message size (defaults to 64 megabytes)
Set the maximum frame size (defaults to 16 megabytes)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for WsHandler
impl UnwindSafe for WsHandler
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more