コード例 #1
0
        private void btnSocket_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 10; i++)
            {
                Thread.Sleep(500);
                _proIo.Send("test");
            }

            //IPAddress ip = IPAddress.Parse("127.0.0.1");
            //Socket serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            //serverSocket.Bind(new IPEndPoint(ip, 8889));  //绑定IP地址:端口

            //serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            //serverSocket.Bind(new IPEndPoint(ip, 8889));  //绑定IP地址:端口


            return;
        }
コード例 #2
0
 private void btnSocket_Click(object sender, EventArgs e)
 {
     _proIo.Send("server message!");
 }