Search code examples
windowssocketstcpbandwidth-throttling

Simulate slow speed for TCP sockets in Windows


I'm building an application that uses TCP sockets to communicate. I want to test how it behaves under slow-speed conditions.

There are similar question on the site, but as I understand it, they deal with HTTP traffic, or are about Linux. My traffic is not HTTP, just ordinary TCP sockets, and the OS is Windows.

I tried using fiddler's setting for Modem Speed but it didn't work, it seems to work only for HTTP connections.


Solution

  • While it is true that you probably want to invest in an extensive set of unit tests, You can simulate various network conditions using VMWare Workstation:

    Network Settings Screen

    You will have to install a virtual machine for testing, setup bridged networking (for the vm to access your real network) and upload your code to the vm.

    After that you can start changing the settings and see how your application performs.

    NetLimiter can also be used, but it has fewer options (in your case, packet loss is very interesting to test and is not available in netlimiter).