如何人为产生 ping“请求超时”
我想在一台机器的互联网上生成一个请求时间,用于测试应用程序在互联网突然超时时会发生什么情况。
已更新 系统是Windows Server 2008,我想手动执行此操作,只是为了检查winform应用程序是否在ping突然中断时继续发送电子邮件
I want to produce a request time on internet of a machine, its for testing purpose for an application what happens when internet suddenly time outs.
Updated
system is windows server 2008, i want to do it manually just to check if the winform application keeps dispatching emails if there is a sudden ping break
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过(a)忽略回复,(b)在防火墙中过滤掉回复数据包来模拟它。取决于您的系统。
You can simulate it by (a) ignoring the reply, (b) filtering out the reply packet in firewall. Depends on your system.
您的开发人员能否在代码中直接抛出 ping 异常?显然你没有提到 @Tim S 评论的编程语言,但在 C# 中有一个
PingException
类 - MSDN 链接 。Could your developer not just throw a ping exception in their code? obviously you haven't mentioned the programming language as @Tim S commented, but in C# there is a
PingException
class - MSDN link .