Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# DatagramSocket事件消息已接收dosen';t触发器_C#_Sockets_Windows Runtime_Windows Phone 8.1 - Fatal编程技术网

C# DatagramSocket事件消息已接收dosen';t触发器

C# DatagramSocket事件消息已接收dosen';t触发器,c#,sockets,windows-runtime,windows-phone-8.1,C#,Sockets,Windows Runtime,Windows Phone 8.1,我有一个基于System.Net.Sockets UdpClient的控制台Udp服务器,我从中向Windows Phone 8.1的Ip发送Udp数据包 手机上的客户端使用Windows.Networking.Sockets DatagramSocket,我的问题是接收到的事件消息没有发生 DatagramSocket的来源:我花了很长时间才找到解决方案,因为它非常愚蠢:DatagramSocket只在发送了一些东西之后才开始接收。(至少对于广播消息。) 一些代码:我对这个领域一无所知,但我倾

我有一个基于System.Net.Sockets UdpClient的控制台Udp服务器,我从中向Windows Phone 8.1的Ip发送Udp数据包

手机上的客户端使用Windows.Networking.Sockets DatagramSocket,我的问题是接收到的事件消息没有发生


DatagramSocket的来源:

我花了很长时间才找到解决方案,因为它非常愚蠢:DatagramSocket只在发送了一些东西之后才开始接收。(至少对于广播消息。)


一些代码:

我对这个领域一无所知,但我倾向于认为没有足够的信息来调查这个问题。您是否在代码中启动此UDP数据包?如果是这样的话,我们能看到代码吗?我们需要看到你的代码。不幸的是,这对我的应用程序没有帮助。node.js中的一个小测试服务器可以毫不费力地接收UDP,但是C#的东西要复杂得多,根本不起作用。非常令人沮丧。