Advertisement

How do I test my programs...

Started by June 16, 2006 05:45 PM
3 comments, last by StarikKalachnikov 18 years, 7 months ago
...if I don't have a server? I've read practically every guide in FAQ on sockets and datastreams and whatnot and I thought to myself, "Hey, this is really cool, I should try this out." But as much as I want to write client/server applications, I have no way of testing them because I don't have a network to put my programs on. I don't have any way of knowing if my programs can even talk to each other. Is there a way to test these programs on my home computer so I don't have to spend any money? Maybe, is there a way to create a "virtual network" on my machine? How would you guys test your network programs? Thanks.
Well, as long as you have a "Server" program for your client to talk to then you are fine.

Run the server application on your machine and just have the client connect to localhost (127.0.0.1)

You'll be able to talk back and forth between your programs, although this generally isn't the best way to test a network application - it's still better than nothing.
Advertisement
You can host the client -and- the server on the same computer. The server will have address 127.0.0.1 or 'localhost' without the quotes.

/edit: Spuit 11 :)
Thanks for the tip; I got it to work and now the self-education is moving along swimmingly! I'm learning to do it in Java with TCP connections, so it's not so difficult to do... but now I'm trying to figure out how to get multiplexing to work... >_<
Well you could for example make a vmWare workstation or a microsoft windows virtual server onto which you'll install a fresh copy of your networking program.

You'll then have an idea that it'l atleast work on a local network, right?!

I might be wrong so please correct me if I am.

Greetings,

Starik
Next time I give my advice, I'll buy some bubblegum so I won't your kick ass!

This topic is closed to new replies.

Advertisement