1. 首页
  2. 编程语言
  3. C#
  4. 搜索局域网内IPCamera设备

搜索局域网内IPCamera设备

上传者: 2018-12-28 11:58:24上传 DOCX文件 23.58KB 热度 63次
搜索局域网内IPCamera设备 public Receiver() { _thread = new Thread( delegate() { // Create the client UDP socket. Listing on port 9003 IPEndPoint endPoint = new IPEndPoint(IPAddress.Any, 9003); UdpClient client = new UdpClient(endPoint); // Receive the packets asynchronously. client.BeginReceive( new AsyncCallback(OnPacketR eceived), new UdpState() { Client = client, EndPoint = endPoint }); // Wait for the thread to end. _shutdownThread.WaitOne(); } ); } eceived), new UdpState() { Client = client, EndPoint = endPoint }); // Wait for the thread to end. _shutdownThread.WaitOne(); } ); }
用户评论
码姐姐匿名网友 2018-12-28 11:58:24

非常好用,解决了我的问题