• Advertisement
Sign in to follow this  

Testing

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm writing a simple program with a dedicated server, and I'm trying to think of ways to test it effectively. Obviously you can connect to the server on the same machine via 127.0.0.1, but are there any tricks to simulate various net connections on a limited range of machines? I have three computers connected to the net via a hub, so I can try with those, but I'm not sure whether the packets would actually get out of the network, or whether the hub would spot them and send them straight to the destination machine. There are similar possible issues with firewalls, etc. Sorry if this sounds confusing - as you can probably tell I'm pretty unexperienced at networking. To reiterate in case you got lost in there :) Is there a good set of practical routines to thoroughly test a dedicated server/client application with the aforementioned computer setup?

Share this post


Link to post
Share on other sites
Advertisement
You can write your own wrapper for socket(), send(), select() etc which pretend that there's a network in between, but really, they just shuffle data to another instance of your program running on the same machine. Inside your fake implementation, you can delay some packets, re-write addresses, drop, re-order and duplicate UDP packets, etc, if you want.

Share this post


Link to post
Share on other sites
There are also programs that let you do this, for example.

-One that comes with one of the game programming gems(don't remember which at the moment)

-NIST Net(for linux)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement