I'm using the following TCP Sockets Server/Client example: http://www.codeguru.com/Csharp/Csharp/cs_network/sockets/article.php/c8781/
I'm also using the following CryptoStream example: http://www.obviex.com/samples/Encryption.aspx
Problem: Both Server and Clients communicate perfectly until I Stop the Server socket, wait a minute or so, then start the Server socket. Sometimes but not always I recieve a base64 error in the Encryption.aspx on line 'Convert.FromBase64String(cipherText);'...
I know there is incorrect / corrupted data in the buffer probably left-over from stopping the socket. Then the new data comes in and the error occurs.
Q. Will clearing the 'class SocketPacket; solve this issue?
Q. How do I clear the 'class SocketPacketsocketBuffer'?
Other suggestions are greatly appreciated..