How do I detect when a telnet client is improperly closed to a tcp server?
问题 I am experimenting in creating a small IRC server to learn some new programming concepts (and others I haven't used in forever). The first step is to get a basic client connecting via TCP to send plaintext commands to the server. To listen for connection I have the following code: public NetworkClient(Server server, TcpClient socket, int id) { _socket = socket; _id = id; _server = server; } private async void ListenForClients() { int numClients = 0; while (IsRunning) { var tcpClient = await