private void serverSocket_ClientConnected(object sender, SocketEventArgs e) { btnListen.Text = "Disconnect"; txtSend.Enabled = true; btnSend.Enabled = true; btnSendFile.Enabled = true; txtChat.Text += "Remote client " + e.RemoteEndPoint + " connected" + Environment.NewLine; }
private void clientSocket_ConnectSucceeded(object sender, SocketEventArgs e) { txtSend.Enabled = true; btnSend.Enabled = true; btnSendFile.Enabled = true; btnConnect.Enabled = true; btnConnect.Text = "Disconnect"; txtChat.Text += "Connected to " + e.RemoteEndPoint + Environment.NewLine; }
private void clientSocket_Disconnected(object sender, SocketEventArgs e) { txtSend.Enabled = false; btnSend.Enabled = false; btnSendFile.Enabled = false; btnConnect.Text = "Connect"; txtChat.Text += "The server at " + e.RemoteEndPoint + " forcibly closed the connection." + Environment.NewLine; }