コード例 #1
0
 private void StartListening()
 {
     txtIPAddress.Enabled = false;
     txtPort.Enabled      = false;
     button1.Text         = "Stop";
     IsListening          = true;
     server = new TCPServer();
     server.ClientConnected    += server_ClientConnected;
     server.ClientDisconnected += server_ClientDisconnected;
     server.TextReceived       += server_TextReceived;
     server.ListenOnAddress     = txtIPAddress.Text;
     server.ListenOnPort        = Convert.ToInt32(txtPort.Text);
     server.StartTCPServer();
 }