Jump to content

  • Log In with Google      Sign In   
  • Create Account

Simulating a network on one machine


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Michalson   Members   -  Reputation: 1657

Like
Likes
Like

Posted 03 March 2000 - 10:40 AM

I''m interested in developing some multiplayer software, and I''ve already created a simple chatroom in DirectPlay. My problem comes in testing. If I''m connected to the net or on a network I can created two instances of my chatroom on one computer and connect them to each other. However, without the network connect they cannot detect each other. Is there anyway I can configure my system to believe it''s on a network (?make multiple ips?make a program to bounce back packets?). Any suggestions would be appreciated.

Sponsor:

#2 Facehat   Members   -  Reputation: 696

Like
Likes
Like

Posted 03 March 2000 - 10:49 AM

I dont know what to do about having only one system, but if you have two systems you might consider getting a serial cable and using the Direct Cable Connection program that came with windows. It simulates a network, and I found it pretty useful before I actually put in a real network.

--TheGoop

Edited by - TheGoop on 3/3/00 4:50:15 PM

#3 SiCrane   Moderators   -  Reputation: 9605

Like
Likes
Like

Posted 03 March 2000 - 06:57 PM

The only way I can think of configuring a single computer like that is to put two network cards in and bind them to different IP addresses and link them to each other. Obviously it''s a lot easier to just get two separate computers than to deal with that kind of weirdness.

Possibly you can write a device driver to emulate a network interface and pass events over loopback to other instances of itself, but that is probably outside the scope you''re considering.

#4 Hotstone   Members   -  Reputation: 133

Like
Likes
Like

Posted 03 March 2000 - 08:04 PM

I do all my testing on just one machine. You know the address you want to connect to: 127.0.0.1 is the IP address, and the port is whichever port your program allocates.

Provided each instance of your program allocates a unique port (and can determine the other instance''s port) you should be right. (I''ve never tried running two instances of a program that allocates a set port so I don''t know what would happen, but I imagine the second instance would fail?).

You mentioned DPlay in a peripheral sense, so I''ll just add that I know nothing about it.

-Hotstone

#5 SiCrane   Moderators   -  Reputation: 9605

Like
Likes
Like

Posted 03 March 2000 - 08:20 PM

Hotstone: Directplay binds on interfaces rather than TCP/UDP ports, so you can''t use the normal IP loopback address for debug effectively. Oh and two sockets attempting to bind on the same port *will* cause the second call to fail.

#6 Michalson   Members   -  Reputation: 1657

Like
Likes
Like

Posted 05 March 2000 - 06:15 AM

Well, at the moment I can do some limited testing with my p120 laptop hooked up to LPT1, but eventually my laptops lack of a 3D accelerator will render testing impossible. If anyone else has any ideas I would still be interested.

#7 Mezz   Members   -  Reputation: 570

Like
Likes
Like

Posted 05 March 2000 - 06:33 AM

The ideal way to test you software is with the actual hardware, i.e. two computers hooked up together, if you cannot afford this expense, then look at asking a few people to help you out with testing it.
Although you baffel me, why, having (as you have said) been able to make it work on a network, do you want to try running it twice on your own computer?
Oh well, the worlds a strange place.
And while we''re at it, I have 2 test machines here with all the kit, so if you are desperate I''ll test it for you if you sent it to me.

Take it easy, they''re only suggestions

-Mezz


#8 Spiff   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 March 2000 - 06:57 PM

I debug my DirectPlay apps on the same computer, but I only use IPX, because that works fine on the same computer, but if you want to test performance/lag and more advanced stuff, you should let someone else test it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS