Question : Opening secure port to receive TCP data

I have opened a port on a server which listenens for and processes incoming data using an app in vb which uses TcpListener ( Dim tcpListener As New TcpListener(portNumber))

I have modified the firewall to allow data through on the port and i am getting the data ok. The problem i have is i want to secure the port in some way , in the same way that i can apply an SSL cert to a web site.

Has any one any suggesstions\information on how i would go about this ?

Answer : Opening secure port to receive TCP data

You can create an SslStream.  See here:
http://msdn.microsoft.com/en-us/library/system.net.security.sslstream%28VS.80%29.aspx

Although the example is in C#, you hopefully can get the idea of how it works.  Basically, you still use TcpListener to get the connection, then add an SslStream to the client connection using a cert and key-pair.
Random Solutions  
 
programming4us programming4us