Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Global network  (Read 2641 times)

0 Members and 1 Guest are viewing this topic.

diego997

  • Newbie
  • *
  • Posts: 21
    • View Profile
Global network
« on: December 12, 2012, 07:34:43 pm »
Hi, I have already finished my simple comunicator, but it works only when two clients are connected together by using for example Hamachi. Is it possible to comunicate somehow without such programs ? In other words how  to send and receive informations between two clients if they are not connected in LAN ?

Greetings :)

isReady

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Global network
« Reply #1 on: December 12, 2012, 08:02:57 pm »
For communicating over the internet you need to configure your router. Normally the router blocks every request from outside so no hacker shall get into your network. If you want to run a server in your intranet you need to open the ports at your router. It's called "Port Forwarding" and when searching it with google you will find a lot of tutorials.

As soon as everything is configured well clients can connect to your server with your global Ip address (the sf::IpAddress-class has a member function for retrieving it).

diego997

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Global network
« Reply #2 on: December 12, 2012, 09:48:12 pm »
cool thank you for answer I am going to read about this now :D


P.S one more question, what about if I want to send massage to the clinet he also needs to configurate a router ? It would have no sence ;p
« Last Edit: December 12, 2012, 09:53:57 pm by diego997 »

isReady

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Global network
« Reply #3 on: December 13, 2012, 09:36:46 pm »
No, you just have to configure the router of the server. As soon as the tcp-connection is built both can send and receive. If you use udp-packets I am not sure how it exactly works  because I never used them but it should work the same.