I have a client-server application which communicates over TCP/IP.
I use System.Net.Sockets.Socket type object for ascnyronous communication over TCP. Basicly i open connection send/receive data and close connection. And my implementation is based on Socket type objects.
Now i need to use a third-party dll to do something. This dll expects a System.IO.Stream type object. So i need to get Stream object of my Socket object.
How can i do that?
Thank you.
I have a client-server application which communicates over TCP/IP. I use System.Net.Sockets.Socket type object
Share
Pretty simple really. The constructor for the NetworkStream class accepts a socket to wrap:
http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.aspx