Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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;
 }