Пример #1
0
        private void Connect_Click(object sender, EventArgs e)
        {
            MySocket s = new MySocket(ServerIPTxt.Text.ToString());
            Thread   t = new Thread(new ThreadStart(s.acceptConn));

            s.OnSockMessage += new MessageDelegate(OnSockMessage);
            t.Start();
            ListenBtn.Enabled  = false;
            ConnectBtn.Enabled = false;
        }
Пример #2
0
 void init(int port, string address)
 {
     s = new MySocket(address, port);
     s.Connect();
 }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            MySocket s = new MySocket(ServerIPTxt.Text.ToString());

            s.Connect();
        }