奇怪UDP是无连接的,怎么会这样呢!??
UDP本来就不需要握手的...

解决方案 »

  1.   

    用我的UDP的接受试试public void ReceiveMessage()
            {
               //在本机指定的端口接收
                IPEndPoint remoteIpEndIPoint = new IPEndPoint(IPAddress.Any,1000);
                udpReceive = new UdpClient(remoteIpEndIPoint);
                IPEndPoint iep = new IPEndPoint(IPAddress.Any, 0);
                //接收从远程主机发送过来的信息
                while (true)
                {
                 //ref表示引用类型的 IPPoint实例接收消息
                    byte[] receiveBytes = udpReceive.Receive(ref iep);
                   for (int i = 0; i < receiveBytes.Length; i++)
                    {
                        RetStr += String.Format("{0:X2} ", receiveBytes[i]);
                    }
                   MessageBox.Show(RetStr);
                }
            }
      

  2.   

    UDP 是面向无连接的,他不管接收端能否收到的!