any_suggestions
asked on
Asynchronous SSL TCP Listener
Hi,
I have a TCP Socket Server program which, in summary, accepts connections from multiple concurrent clients, it asynchronously reads data from each client, processes the data and returns an acknowledgement to the client.
This is working fine, but I need the data to be sent/received over an SSL stream.
I don't think this is possible using the TCP Socket classes I am currently using??
But I think it should be possible if I use TCP Client and TCP Listener classes. However, at the moment it can accept connections asynchronously (using TCPListener.BeginAcceptTcp Client), but when I try to read the data asynchronously using the SSLStream.BeginRead it is not reading the data in the byte array correctly. It receives the correct number of bytes but all the data in the array is null.
The program works fine using the synchronous Read method using the same X509 Cert, so I don't think it is related to the cert.
I cannot find any good examples of this kind of code on the web, so any help is greatly appreciated.
I have a TCP Socket Server program which, in summary, accepts connections from multiple concurrent clients, it asynchronously reads data from each client, processes the data and returns an acknowledgement to the client.
This is working fine, but I need the data to be sent/received over an SSL stream.
I don't think this is possible using the TCP Socket classes I am currently using??
But I think it should be possible if I use TCP Client and TCP Listener classes. However, at the moment it can accept connections asynchronously (using TCPListener.BeginAcceptTcp
The program works fine using the synchronous Read method using the same X509 Cert, so I don't think it is related to the cert.
I cannot find any good examples of this kind of code on the web, so any help is greatly appreciated.
What programming language is your program written in?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.