How to intentionally delay TCP packets in one direction

3

I've looked at this already: How to deliberately introduce a delay for incoming UDP packets

I am testing a server-client system, and need to delay messages from the server to the client by some specified delay -- say 1ms. I don't want packets in the other direction to be delayed.

Some sort of proxy software is completely acceptable. Any suggestions for windows?

Dilum Ranatunga

Posted 2013-06-10T16:29:07.223

Reputation: 431

1

Are you using HTTP/S? The tool Fiddler2 functions as a SOCKS proxy and will allow you to slow down or otherwise manipulate HTTP requests for testing purposes.

– Darth Android – 2013-06-10T16:33:22.197

Unfortunately, no. Straight sockets, as far as I can tell. I didn't write the server or client. Just testing what happens with two clients receive events at "noticeably" different times. – Dilum Ranatunga – 2013-06-10T16:41:03.320

Answers

3

WANem (http://wanem.sourceforge.net/) is a liveCD linux distro that let's you manipulate traffic on the wire. You can limit bandwidth, introduce lag, jitter, lost packets, and a bunch of other cool things.

Just boot it in a spare PC or VM and create routes on your client and server and you're all set.

Jim G.

Posted 2013-06-10T16:29:07.223

Reputation: 2 794