View Full Version : Creating Global Network

8th November 2013, 07:59
Hi everybody,,

i want to know that how we communicate Server <-> Client on global network, not local network. I have interested the network example in Qt that all examples work on local network.

how I can connect client to server via global network(internet) like msn messenger.

I want to make it with TCP socket programming.

8th November 2013, 09:22
Fromt the application programming point of view there is no difference between local or remote machines, usage of the socket classes is always the same.
The only thing that changes is the address you connect to.


8th November 2013, 09:44
Yes Programming interface is same local or global but

which address i should connect?

my local ip is and port 12345, I can connect this address successully if target address and source address connected the same modem.

if I try to connect my target other places(other city, home vs...) , ip address changing.

on my line Source->Modem->Global Network->Modem->Target

How I construct above struct?

which way I should follow to make it?

8th November 2013, 10:41
You should connect to "external" IP under which a router is shown. The router should be configured forwarding calls to a specific internal address.

8th November 2013, 13:26
which address i should connect?

Whatever address the server is using that you are trying to connect to.
Probably given as a domain name.

There is really no difference from the programming point of view.

Same thing for implementing a server.

In both cases the network setup needs to be able to route packets from one machine to the other and back.

All handled by the operating system, really nothing the application developer has to worry about.