ewebsock
ewebsock copied to clipboard
TLS not supported when tokio feature is enabled
Problem: I have the tls feature enabled and when I try to connect to secured connections (WSS) I get
URL error: TLS support not compiled in
I've discovered it is because the tls feature only enables support in tungstenite and not tokio-tungstenite so if the tokio feature is enabled then tls is no longer supported.
I worked around it by adding the following to my Cargo.toml
# Cargo.toml
[dependencies]
tokio-tungstenite = { version = "*", default-features = false, features = ["rustls-tls-native-roots"] }