How to simulate Network situation where message lost or server don't send it?

I've wrote simple Client-Server application and try to test it. I need to write some code to handle when the reply message (sent by server) is being lost and don't reach the client ... I need to know how to simulate such situation. but I cannot. I've tried the `CTRL-C` the server .. but not sure if this a good scenario.. I got from the client: send: 0 0 0 5 0 0 1 48 25 112 -55 106 0 0 0 34 60 -72 117 -101 37 28 116 -85 -91 61 55 -126 -50 9 5 64 -87 126 -31 -62 30 13 -90 -72 -124 118 20 88 -80 -9 -36 -33 -38 123 java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at net.Net.readMessageObject(Net.java:36) at net.Pitcher.run(Pitcher.java:59) at net.Pitcher.main(Pitcher.java:122) BTW, the app written in Java.

以上就是How to simulate Network situation where message lost or server don't send it?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏