Jump to content

  • Log In with Google      Sign In   
  • Create Account


How to establish connection through internet


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
4 replies to this topic

#1 TreantBG   Members   -  Reputation: 100

Like
0Likes
Like

Posted 30 March 2012 - 12:46 AM

Hello.
I have created a simple game, and i want to make a online multiplayer mode.
I did understand how UDP or TCP/IP Socketing works (i have already made LAN mode to the game) BUT i seems fail to understand how to connect to another player via Internet with his global IP.

every my attempt to connect to my public IP has failed.

i want similar player connection like diablo 2 direct IP connection.

pls if you have examples post a link to them i will be very greadfull


P.S. ITS NOT a firewall problem or other of this kind.

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6034

Like
0Likes
Like

Posted 30 March 2012 - 01:02 AM

1) make sure you bind the listening socket to all addresses.
2) same as for LAN, if it doesn't work then it is a firewall/routing problem.

Also, many cheap routers (especially ones that include a DSL modem) will fail miserably if you try to connect to your own public IP from inside the LAN. (if you need to do this for testing purposes then either get a router that you can configure properly for this(usually the setting you want to enable is called NAT loopback) or place the server somewhere else while testing)

Thus most likely i'd say that it is actually a firewall/router problem despite your assurance of the opposite :)
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 TreantBG   Members   -  Reputation: 100

Like
0Likes
Like

Posted 30 March 2012 - 01:31 AM

if this is so its probably from my router

from the settings i dint find NAT loopback...

#4 DarkRonin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 30 March 2012 - 03:04 AM

Most likely a router issue.

On the server end you, will need to forward the required port to the internal (LAN) IP address of the server.

The client will need to connect to you WAN ip address. If you dont know what that is, you can find it by typing 'what is my ip addesss' into google.
Google these days tells you what you IP address is, without having to go to a 3rd party site.


Hope this helps Posted Image

#5 Antheus   Members   -  Reputation: 2397

Like
0Likes
Like

Posted 30 March 2012 - 07:45 AM

telnet ip-to-connect-to port

Does that open a connection? If no, there might be a firewall issue.

Otherwise the problem lies in your code.




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