Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Customizing the websocket

Sometimes it's necessary to customize the websocket that steam-vent uses, for example to change the TLS settings or configure a proxy.

To accomplish this, steam-vent allows using a custom transport with UnAuthenticatedConnection::from_sender_receiver which takes a impl Sink<BytesMut, Error = NetworkError> that will be used to send messages to steam, and a impl Stream<Item = Result<BytesMut, NetworkError>> that is used to receive messages.

The Sink/Stream pair can be acquired, for example, by spliting a websocket from tokio_tungsentite and maping it's data to/from BytesMut.

Once you've created the UnAuthenticatedConnection you can start a session by using anonymous, anonymous_server or login.

See the custom_transport example for a full example of creating a Connection with a customer transport.