Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (button1.Text == "Start Server")
     {
         server.StartListening();
         button1.Text = "Stop Server";
     }
     else
     {
         button1.Text = "Start Server";
         server.Stop();
         server = new AsynchronousSocketListener(this);
         label1.Text = "";
         label2.Text = "";
         label3.Text = "";
     }
 }
Exemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     server= new AsynchronousSocketListener(this);
 }