networking - Communicating between networks using sockets -


i have question network connections among computers. i've made applications messages pass through internet (via sockets) make connection between 2 devices. however, strong condition 2 devices must connected same network.

can give me trick how create communication using sockets between 2 computers if connected different netwkorks?

thank in advance.

here great tutorial on how use sockets , general networking (in java)
http://www.thenewboston.org/watch.php?cat=25&number=38

in order communicate between 2 diffrent networks on internet, need called port forwarding. when public ip of network receives packet spesific port number. router knows send packet local ip.

if dont port forward , receive data. router doesent know send packet. therefore discards it, means others wont able connect you.

you need port forward network server (using example linked). how logging in router, , port server uses gets forwarded ip of pc hosting server.

on other network (client) need change ip address of client shall connect to. ip address needs public ip of server's network. can find connecting server's network , go to: http://www.whatsmyip.org/ . keep in mind public ip addresses may change on time.

hope helped!
-kad


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -