摘要: 首先写个接受消息的服务端(接收方一般定义为服务端,发送方一般定义为客户端)。这里偷了点懒,new UdpClient(11000)就是用Udp方式侦听11000端口,侦听任何发送到11000端口的消息都会接收到。 static void Main(string[] args) { UdpClient udpClient = new UdpClient(11000); try { while (true) { IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0); Byte[] receiveBytes = udpClie. 阅读全文
posted @ 2013-06-17 23:20 一一二二 阅读(737) 评论(0) 推荐(0) 编辑