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; }
private void btnSocket_Click(object sender, EventArgs e) { _proIo.Send("server message!"); }