使用 UDP 的应用程序之间的双向通信
我已经使用 TCP/IP 完成了此操作。我现在正在尝试使用 UDP 来做到这一点。这些应用程序都在同一主机上运行。因此客户端/服务器都在 127.0.0.1:5000 上发送/接收。问题是他们正在接收发送给其他应用程序的消息。
I've done this already using TCP/IP. I am now trying to do this using UDP. These applications are both being run on the same host. So both the client/server are sending/receiving on the 127.0.0.1:5000. The problem is that they are receiving the messages intended for the other application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法从同一台计算机测试这些 UDP 应用程序。 UDP中没有连接的概念,所以这里没办法区分。
You can't test these UDP applications from the same machine. There is no concept of a connection in UDP, so there is no way to distinguish here.