It works perfectly fine(server notices when client disconnects) when launching it without Mono on Windows. When using Mono on Windows or Linux it just doesn't work, server doesn't notice that client disconnected.
TcpClient socket = new TcpClient();
NetworkStream stream = socket.GetStream();
I've observed that TcpClient also doesn't seem to notice when the server closes the connection from its end. Attempting to read or write from it eventually causes a timeout, but does not change the connected state or indicate that the connection has been lost.
I could reproduce this on mono 3.10.
If the server sends an RST the client doesn't notice that the connection is closed, and timeouts without setting Connected to false.
it makes for a very bad network performance of mono
we need network performance!
I hope someone is looking at this soon
this bug is exist long enough...