Closed trampster closed 2 years ago
You are using the tls
feature, but there is no such feature, try to use native-tls
or rustls-tls-webpki-roots
or other TLS features (depending on your requirements) and I think it would allow you to get the behavior you expect 😉
See Features
section for more details.
With: tokio-tungstenite = { version = "0.11.0", features = ["native-tls"] }
I get "URL error: TLS support not compiled in"
Ah sorry, I did not notice you used the version 0.11.0
, it's a very old version. The current version is 0.17.1
, could you try with it?
NB: Version 0.11.0
should work with tls
feature though. Not sure why it fails. Do you have a SSCCE that could be used to verify the issue?
When I try to do it with the following:
With this in my cargo.toml
tokio-tungstenite = { version = "0.11.0", features = ["tls"] }
Then I get this error (serverside):
Googling indicates that there should be a upgrade header telling the server to upgrade the https connection to the websocket. But for some reason it is missing.