Can I connect between only local machine or can connect to another network?
-
If you have a suitable connection, and firewall rules permitting, you can even establish a socket connection to the International Space Station. – Sam Varshavchik May 09 '17 at 00:43
-
Yes you can.... – CroCo May 09 '17 at 00:50
1 Answers
Short answer
Yes, you can !
Long answer
What you're trying to achieve is called a Peer-to-Peer (P2P) connection (see the Wikipedia page for more details).
So first of all, it will depend on the network protocol you will be using. Do you want to connect two clients over the Internet (IP - Internet Protocol)? Or over Bluetooth, NFC or anything else?
Assuming you want to use IP, the difficulty of getting it to work depends on your networks. If you have a fixed public IP for each client, it's all going to be pretty straight forward. If you don't, it gets a bit more complicated, depending on the case. If you have access to the router of each network, you can the redirect a specific port on each side to point to you client, in the subnetwork.
Otherwise, you will have to learn about NAT traversal. Since most routers create a subnet and assign non-public addresses to their clients.
Give us more details about your network architecture so we can give you more precise advice.
Cheers,
D