i wrote a client/server application in c# , client generate some queries and server reply to that , i want to encrypt all the packets on the network , i decide to use SSL for encryption , now my question is how can i use SSLSTREAM in TCP Async Sockets on the server side and client side too , Sslstream neead a stream buffer for sending and receiving data that could be handled by client.Getstream() ,my problem is that my clients socket is a async socket but Getstream needs clients socket to be in sync mode (Tcplistener) , how can i solve it ? thanks.
Asked
Active
Viewed 691 times
0
-
See this SO question: https://stackoverflow.com/questions/29875726/how-to-create-sslstream-for-a-non-blocking-async-socket – Michael Di Felice Jan 11 '17 at 16:42
-
Better yet, here's an MSDN article with some sample code: https://blogs.msdn.microsoft.com/joncole/2007/06/13/sample-asynchronous-sslstream-clientserver-implementation/ – Michael Di Felice Jan 11 '17 at 16:44