Image

Secure Sockets

Hi there,

I hope I don't sound like too much of a newbie with this, but it's been plaguing me for a while.

I've written several apps using standard Java sockets, and have gotten into the habit of using them in the way the Java tutorial uses them; ie, passing multiple pieces of data in both directions with a single socket, and closing the socket only after the entire data transaction is complete. However, it seems the SSLSocket/SSLServerSocket classes don't like to operate in this manner. With debugging turned on, I can watch my initial 'SYN' data go from client to server, and I see the 'ACK' being encrypted by the server, passing through the network, arriving at the client, and being decrypted. But for some reason, a read() call won't give me the data.

I have tried googling for other examples of SSLSocket usage, but the only results I seem to find are the same "Echo server" example from the Java Tutorial. I get the impression that SSLSocket/SSLServerSockets aren't meant for two-way communication, but I can't find anyone willing to say yes or no either way.

Thoughts/suggestions?

Thanks in advance.