🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectPlay over the internet

Started by
6 comments, last by KalvinB 23 years, 12 months ago
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
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
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
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
I''m assuming that you can ping it?

-BacksideSnap-
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
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).
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

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
// CHRIS [win32mfc]

This topic is closed to new replies.

Advertisement