title: Adding some latency to windows localhost
body: <p>Ok, it's been almost 2 days since I started to look for the solution, no hope yet.
  We are developing a real-time action game using flash. Different players connect to each other with peer-to-peer connection. So I test this application on my computer, with two or more clients simultaniously. Now as there's a P2P connection between different clients, and all of them are running on my computer, there's almost no latency between them at all (5-10 ms) so when I test it looks ok, and when we test it through the internet with greater latencies (up to 100 ms), some synchronisation problems occur.
  It's impossible for me to test this application through the internet all the time, as I need to see the difference between clients to understand what is to be changed.</p>
  
  <p>Since the connection between clients is working seamlessly, I cant find out which ports do these clients use, so I can't actually use all those "localhost proxy" programs.
  I found out about a great tool WANem, which can add some latency on all traffic passing through it.
  So the main problem is - I can't reroute my localhost (127.0.0.1) traffic through anything, a command </p>
  
  <pre><code>route add 127.0.0.1 mask 255.255.255.255 192.168.0.15
  </code></pre>
  
  <p>doesn't work at all. and if I'm trying to add a localhost interface to it</p>
  
  <pre><code>route add 127.0.0.1 mask 255.255.255.255 192.168.0.15 if 0x1
  </code></pre>
  
  <p>it just prints out some errors.
  192.168.0.15 is an IP adress of the WANem</p>
  
  <p>Everything except routing my localhost traffic is working just fine.</p>
  
  <p>Once again - I searched almost through the whole internet, and there was nothing about routing localhost traffic on windows. And maybe there's another way of adding some latency to the localhost without knowing the ports.</p>