Detect client disconnect when network adapter was turned off – Debian
I have trouble with detecting client disconnect from host. Currently my code looks like this: Task.Run(() => { // Create server Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) { ReceiveTimeout = -1, }; server.Bind(new IPEndPoint(IPAddress.Any, port)); server.Listen(-1); // Start listening…