Closed serzhiio closed 2 years ago
I will try to make an example. ws_stream_tungstenite
doesn't deal with the actual connection. You have to connect using tokio-tls
, tokio-tungstenite
and pass the WebSocketStream
to WsStream::new
.
Know that in order to test an example a TLS connection locally, you will have to set it up TLS certificates correctly or use an API that skips verification. You can have a look the examples for tokio-tls.
Note that currently tokio-tungstenite
still uses tokio
0.1, but as soon as they switch to 0.2 (work is well under way), I will update ws_stream_tungstenite
. Until then I will keep the alpha versioning.
Im actually going to close this, since it really doesn't belong here. All this crate does is implementing AsyncRead/AsyncWrite on an existing websocket connection, so instructions for wss should be in the tungstenite or the async-tungstenite crate.
Could you show an example of how to connect to
wss://
like addresses. As examplewss://site.com/ws/v2/