Hi Anthony,
actually I solved the problem yesterday by using the following code. Now everything works 100% reliably. Yay!
mServerSocket.ReceiveTimeout = 500; while (true) { try { using (Socket clientSocket = mServerSocket.Accept()) { // Try to read a request var buffer = new byte[1024]; if(clientSocket.Receive(buffer, 1024, SocketFlags.None) > 0) {
But I think your solution might work just as well, too. The trick is to wait for the bytes to come in and not to abort prematurely. So screw those online-tutorials; they are all wrong
Thank you!