Struct finchers_tungstenite::Ws [−][src]
pub struct Ws { /* fields omitted */ }
A type representing the result of handshake handling.
The value of this type is used to build a WebSocket process after upgrading the protocol.
Methods
impl Ws
[src]
impl Ws
pub fn config(self, config: WebSocketConfig) -> Ws
[src]
pub fn config(self, config: WebSocketConfig) -> Ws
Sets the configuration for upgraded WebSocket connection.
pub fn on_upgrade<F, R>(
self,
upgrade: F
) -> impl Output where
F: FnOnce(WsTransport) -> R + Send + 'static,
R: Future<Item = (), Error = ()> + Send + 'static,
[src]
pub fn on_upgrade<F, R>(
self,
upgrade: F
) -> impl Output where
F: FnOnce(WsTransport) -> R + Send + 'static,
R: Future<Item = (), Error = ()> + Send + 'static,
Creates an Output
with the specified function which constructs
a Future
representing the task after upgrading the protocol to
WebSocket.