开发者

Debugging missed broadcast datagrams, which show up in wireshark, but not in C# app?

I have two machines A1 and A2, both of which are running the same embedded code, which broadcast packets. The third machine, B3, is a Windows XP box running a C# (.NET 4.0) app, which listens for those broadcasts.

All of the data from A1 is received by the C# as expected, 95% of the data from A2 is received with int开发者_开发百科ermittent, seemingly random, lost UDP datagrams.

When I look on wireshark on B3, all of the packets from both machines arrive exactly as expected, but when I dump the bytes to a text file immediately after receiving them, I see that datagrams from B2 are missing.

How can it be that a packet is displayed on wireshark, but does not get passed to my C# app, some of the time? I could understand if the datagram had bad headers, etc., but Wireshark shows everything as expected, even for these missing ones. Does Windows / .NET perform some check that Wireshark does not by default?


I would recommend dumping the B2 stream into a file, and then replaying it directly to your app (using a local app, if possible). You should benefit from having a constant data stream in order to (hopefully) narrow down the problematic part.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜