Skip to main content

upgrade

Function upgrade 

Source
pub fn upgrade<F, Fut>(handler: F) -> ReplyData
where F: FnOnce(WebSocket) -> Fut + Send + 'static, Fut: Future<Output = ()> + Send + 'static,
Expand description

Return this from a route handler to turn the response into a WebSocket upgrade. handler runs on the upgraded connection after the handshake. See the module docs.