Not Monitored
Tag not monitored by Microsoft.
25,392 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hello, I want to create tls connecion, if I should do tcpClient.Connect mannual before start tls. if it will create tcp connection Automatically when new SslStream/_sslStream.AuthenticateAsClient
hello!
thank you for your feedback, I konw that if i want to connect tcp connection, I should call _tcpClient.Connect(_iP, _port), however, I'm not sure that I want create tls connection if I call _tcpClient.Connect still before start tls. if create class new SslStream will create tcp connection automatically.
can you give a demo for tls connection.
Hello @Yang, Liang ,
I am not sure if I have completely understood your question here, maybe pasting a code snippet might help.
Based on your comment above you can follow the documentation here Typically, the SslStream class is used with the TcpClient and TcpListener classes. As shown in the 2nd code example here, TCP connection is required before a TLS handshake can take place and you need to create TCP Client connection before starting SSL Stream