c udp聊天测试
我正在用 c 语言编写一个 udp 聊天应用程序。我需要测试是否以错误的顺序接收消息。谁能告诉我一个可以用来延迟某些消息的工具吗?还请告诉我如何使用它?预先非常感谢!我也使用 ubuntu x86_64 和 OSX 10.6.4。任一操作系统中的工具都可以使用
I am writing a udp chat application in c. I need to test if messages are received in an incorrect order. CAn anyone please tell me of a tool I can use to delay certain messages? also please tell me how to use it? thank you very much in advance! also I am using ubuntu x86_64 and OSX 10.6.4. A tool in either OS will work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当我创建系统日志服务器时,我需要查看它是否正在捕获消息。
我使用 http://www.wireshark.org 中的Wireshark / 。这是一个免费工具,可以显示通过网络电缆的所有流量。甚至不适合您的计算机的软件包。
玩得开心...
When I created a syslog server I needed to see if it was catching the messages.
I used Wireshark from http://www.wireshark.org/ . This is a free tool that shows you all traffic passing your network cable. Even packages not intended for your computer.
Have fun...
如果您需要验证这一点,您可能也不希望消息消失(或者至少知道它们是否消失)。 UDP 听起来不像你想要的。看看使用 TCP 来实现这一点,您可以通过协议获得这种行为。
If you need to verify this, you probably also don't want messages to disappear (or at least know if they do). UDP doesn't sound like what you want. Have a look at implementing this using TCP instead, you get this behaviour with the protocol.