ICS DirectPlay problem
Hi, its me again...! ok..the problem:
My P2P directplay aplication works well when i host it in my computer and my friend..on he net try to connect to it. But if i host in a computer in my local network (that access the internet from my computer) he cant even find the game. I have passed my IP to him..soh he uses the IP to try the connection. I think that there is a solution to this that Directplay implement...soh i start reading the MSDN library. (there is nothing in the web about directPlay). I found a interface called IDirectPlayNATHelp...but i couldnt understant how it works..perhaps because my engligh is not good, and the terms are not simple...can someone tell me if IDirectPlayNATHelp is what im looking for, and how does it work?
If your "main machine" us providing internet connection sharing, then another machine on your network cannot be "seen" on the other side of the network (main internet) unless YOUR machine first sends data to THAT machine. That''s how NAT works.
If you can set up port forwarding, such that a specific port on your main machine gets forwarded to your server machine, then people can connect to that port on the IP of your main machine and it''ll be served by your server machine.
More about NAT, and how to circumvent it with introducer/matchmaker servers:
http://www.mindcontrol.org/~hplus/nat-punch.html
If you can set up port forwarding, such that a specific port on your main machine gets forwarded to your server machine, then people can connect to that port on the IP of your main machine and it''ll be served by your server machine.
More about NAT, and how to circumvent it with introducer/matchmaker servers:
http://www.mindcontrol.org/~hplus/nat-punch.html
enum Bool { True, False, FileNotFound };
If you are using ICS then that DirectPlay interface you mention, i.e. the NAT Helper, is of use, as that is exactly what that interface was made to deal with. Essentially, you have the host register the addresses and ports it wants to use. Then use GetAddresses to determine what the public addresses and ports are. If you are using a non-UPnP router instead of ICS, then this interface is useless. Instead you can try using the NAT Resolver interface to deal with that scenario. If you are using a UPnP router then DirectPlay should automatically work out the details as long as you follow the DirectPlay programming NAT guidelines in the SDK.
Thanks for reply. Im using ICS Mastaba. Humm..so NAT helper is what i thought it was..But my problem is that im a idiot.. i really dont know what each fuction in the interface does...really dont know how to use it...and when...is it called before a call to Host...? can someone give me a little peace of code..or a link (i have look for information..but useless)
Ok, im trying to use IDirectPlay8NATResolver to solve my problem. The unique problem is that i cant understand how to use it. Can someone explain how a HOST must use it and how the CLIENT should call Connect in order to have the resolver server working?
Let me explain better: if im the host, behind NAT, i have to use IDirectPlay8NATResolver to (in some form that i dont know) say to the computer directly connected to the net that incoming msg looking for games should have a true response.
if im client i really dont know how to do....
is it right? Can some expert tell what is the order to call:
HOST, GetAdress, GetsCap..and this functions that i really cant figure out...thnks...
ps: owhhw..this time i think my english really sux..more than all others.....^^
Let me explain better: if im the host, behind NAT, i have to use IDirectPlay8NATResolver to (in some form that i dont know) say to the computer directly connected to the net that incoming msg looking for games should have a true response.
if im client i really dont know how to do....
is it right? Can some expert tell what is the order to call:
HOST, GetAdress, GetsCap..and this functions that i really cant figure out...thnks...
ps: owhhw..this time i think my english really sux..more than all others.....^^
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement