Neil McFlea
Neil McFlea

Reputation: 41

How to Test a Network Application with only a Single Computer?

I want to kick myself to learning network programming, starting with implementing existing network protocols. I've finished the (rudimentary) design and will start coding soon. The problem I haven't been able to figure out solution to is related to testing: I only have one Windows laptop running Windows 7 Pro with only a recovery disc (no installation disc) that obviously cannot be used on a VM.

Hard-coding input/output data clearly isn't a good way to test any sort of program. So, what solutions can I look into?

Thanks for your time.

P.S.: In case this matters, I'll do the coding in C++.

Upvotes: 4

Views: 2180

Answers (2)

David
David

Reputation: 797

You can run a client and a server on the same machine. When accessing the network layer, just use the local callback loop (127.0.0.1 for ipv4 or ::1 for ipv6) to connect to your server when you run the client.

If you provide the APIs that you will be using (wininet, APR, Boost etc) a more detailed answer would be available.

Upvotes: 8

NW Tech
NW Tech

Reputation: 328

What about a VM with Ubuntu or some other distro of Linux?

Upvotes: 0

Related Questions