Function websocket_util::stream[][src]

pub async fn stream<S>(
    stream: S
) -> impl Stream<Item = Result<Vec<u8>, WebSocketError>> where
    S: Sink<WebSocketMessage, Error = WebSocketError>,
    S: Stream<Item = Result<WebSocketMessage, WebSocketError>> + Unpin
Expand description

Create a stream of higher level primitives out of a client, honoring and filtering websocket control messages such as Ping and Close.