networkStream.Read is blocking

You could try using the DataAvailable property. It’ll tell you whether there’s anything waiting on the socket. If it’s false, don’t do the Read call.

Leave a Comment