Function kvarn::websocket::wrap

source ·
pub async fn wrap(
    pipe: &mut ResponseBodyPipe
) -> Result<WebSocketStream<WSStream<'_>>, Error>
Available on crate feature websocket only.
Expand description

Get a [tokio_tungstenite::WebSocketStream] from the pipe given by response_pipe_fut!.

Examples

See response().

Errors

Errors if pipe is unsupported.