Is there any way how can I set the timeout for the BinaryReader ?
When a disconnection unexpectedly occurs, and then it is restored, the client program sends the data, but the server part on BinaryReader.Read freezes and the program does not go further than this line. As soon as all clients disconnect, the program comes to life and starts loading everything, as if from a cache of some kind and ultimately gives an exception that the remote client has suddenly disconnected the connection.