client_tls, stream is not upgradeable?
dozepih opened this issue · 1 comments
dozepih commented
Line 162 in 2ee05d1
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.
daniel-abramov commented
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.