Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

KalvinB

DirectPlay over the internet

This topic is 6589 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''ve got a game setup so that the engine is running on one computer and the graphics are displayed on another. The "server" is actually just a hosting client that can''t be run as a real client and real client are clients that can''t be run as hosts. It runs fine over a LAN but I can''t figure out why exactly I can''t conncet using an IP address over the net. I''m currently using ICQ to grab the IP address of the hosting computer from the client''s computer. I tried using the DNS number from winipcfg and that also didn''t work. Any help would be great. Ben

Share this post


Link to post
Share on other sites
Advertisement
What sort of problem do you get? You simply cannot connect?
I''m not sure how ICQ works but you may want to try using a couple API, there is an WinSock API (Maybe DirectX will have an equivalent check the docs) for returning the computers IP address. I''m not an absolute wiz at networking but I have a firend who is, if you could define the problem a bit more he might know the answer... Also are you running the internet THROUGH a lan? Cause then the server or server software might be masking/changing or relaying IP''s, which you might not be set up for, so you could be getting the IP of the actual computer when in reality you cannot contact that computer with that ip. For example with my high speed connection you are given one IP to use to connect to the internet so I use some server software which masks and then transfers service to other machines. I''m not sure how the IP''s all transfer to the internet though as the internally assigned IP''s are internal ONLY. You''ll probably have to use some API''s to get eachother''s IP''s.

See ya,
Ben

Share this post


Link to post
Share on other sites
The server computer is hooked up to the internet over a lan. I''m using a laptop with FreeWeb to test the client. The client isn''t even seeing the server.

I''ll look for the code to grab the IP and see what happens.

Ben

Share this post


Link to post
Share on other sites
I used the SimpleConnect demo included with the DX7 SDK and dropped my source on top of it. When I go through the connect routine and put in the ICQ IP address it just keeps saying it''s searching.

Ben

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah... Like cyberben said, the lan is probably just masking your IP# to the net.

Try running the host version of your software on the system that actually connects to the internet, then try. It should work, (with any luck).

Share this post


Link to post
Share on other sites
Unfortunatly that is what I''m doing. The server is running on the main computer. When I get the IP from the host computer it''s the same as my client computer. When I put the IP address into a browser I get a homepage hosted by the service provider.

Ben

Share this post


Link to post
Share on other sites
A couple things.. Especially if you''re not too familiar with tcp/ip..

(1) Is the host machine behind a firewall? This includes any kind of proxy. If you have an address for the server like 192.168.x.x then it won''t work; that''s a LAN address and doesn''t get forwarded by routers.

(2) Do you know the exact port number? If it''s a stream connection [ie, not datagrams] then can you TELNET to it? You should be able to at least connect. If the server has IP address 1.2.3.4 and the port is 7117, you can run TELNET like this:

C:\> TELNET 1.2.3.4 7117

Be sure you can connect before you tear any hair out over your own code!

Cheers,
// CHRIS

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!