0

With my limited resources and to aid debugging, I am doing local testing on a client-server (game) application by running both a server and one or more clients all on my Windows 7 dev PC. Both client and server are Java applications developed through Eclipse.

Is there any easy way to introduce lag given that everything is running on the same PC... maybe 'hack' the port used or something? Or is this only possible if each application is running on a separate PC (or separate VM)?

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
  • Maybe one of the ideas in this thread would work: http://stackoverflow.com/questions/1094760/network-tools-that-simulate-slow-network-connection – grossvogel Oct 19 '12 at 21:38
  • I did see that but it didn't seem quite the same scenario - maybe I'll look more closely to check. – Mr. Boy Oct 19 '12 at 21:46

1 Answers1

0

Make a feature in the server which makes a random lag within certain time range if detected connection comes from localhost. You can then switch this feature on/off as needed.

pro_metedor
  • 1,176
  • 10
  • 17
  • It's an option but the server uses a 3rd-party library so unless it has such a feature (I don't think so) it would be ugly. It'd also be potentially quite a big change to add this feature if I can do it using some external tool. – Mr. Boy Oct 19 '12 at 21:47