1

Wondering if there is any quick way to simulate some network problems on local server? I am testing my socket.io program serving by localhost:8080, and want to know how it goes when network crashes?

Any suggestion will be appreciated. Thanks.

leonsPAPA
  • 657
  • 2
  • 13
  • 29
  • 2
    Take a look at these questions: http://stackoverflow.com/questions/3415697/simulating-high-latency-intermittent-network-connections http://stackoverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment http://stackoverflow.com/questions/1094760/network-tools-that-simulate-slow-network-connection – Akira Yamamoto Oct 14 '15 at 21:45

1 Answers1

2

I have one suggestion when you only can use one computer: use a software component inbetween. This could be a proxy like membrane which you simply stop while your program is running which basically interrupts the connection.

All other scenarios I can think of need at least another computer or a virtual machine or software defined network.

Marged
  • 10,577
  • 10
  • 57
  • 99
  • 2
    Instead of listening/connecting on `localhost`, maybe use the local IP address directly, so that after the connection is made you can go into the OS settings and disable the network adapter that the IP belongs to. – Remy Lebeau Oct 15 '15 at 01:37