检查是否在C中发送UDP消息
我想检查为什么程序未接收UDP消息。客户程序每次示例都会发送4个整数。我有一个使用“ recvFrom()”在端口上获取UDP消息的服务器程序,但是该程序似乎没有接收端口号上的消息,并且粘贴在“ recvFrom”函数中。我想知道我是否可以使用调试技术来调试此问题?
谢谢!
I want to check why a program is not receiving UDP messages. A client program is sending 4 integers every time sample. I have a server program that is using "recvfrom()" to get the UDP messages on a port but the program does not seem to be receiving the messages on the port number and is stuck in the "recvfrom" function. I was wondering if there are debugging techniques I can use to debug this issue?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有很多可能性,常见的情况可能是
路由,确保ping有效
您的代码错误,请确保循环back地址有效
调试,您可以安装Wireshark来检查特定接口的流量。
There are many possibilities, common case could be,
Firewall on your machine or in transit, for example, your another endpoint is behind a firewall that disallow UDP inbound traffic from this address.
Routing, make sure the ping works
Your code bug, make sure loopback address works
To debug, you could install Wireshark to inspect specific interface's traffic.