Closed dozepih closed 8 months ago
Yes, this is true 🙂 However, we can't identify if the stream is encrypted (we don't know anything about the stream except that it's Read
and Write
). We decide if we need to wrap the stream based on the protocol ws://
vs wss://
. So if you supply a stream X
with wss://
URL, we would try to "upgrade" the stream to use TLS.
https://github.com/snapview/tungstenite-rs/blob/2ee05d10803d95ad48b3ad03d9d9a03164060e76/src/tls.rs#L162
Is this really true? Tried sending in a
TlsStream<TcpStream>
with the result of:TLS error: native-tls error: unexpected EOF
but just using a<TcpStream>
works fine.