Sending data to a remote machine
I have two machines exist inside two different subnets:
-The first 10.0.0.X connected to the Internet throw a router has fixed real IP.
-The second 10.0.0.Y connected to the Internet throw another router has another fixed real IP.
How can I send data from one machine to another using specified port?
Notes:
-I am allowed to install JVM on both machines.
-All the configurations needed on any of the machines should be done using inside Java code.
-I am not allowed to change the routers configurations (can not use NAT or any similar protocols).
Please notice, The two machines exist inside two different subnets, so they do not have real IPs, can you please provide a piece of Java code realizing that (sending any data from on of them to another using socket).
At home I have a little private network with a firewall-router. Sockets are allowed to be opened from inside, then the packets will travel with the router's IP address, but sockets can not be opened from outside. I could configure the router to allow the latter, but I do not. So reset or not, the router works this way.
> Then, how can 2 persons using Yahoo messenger or> (MSN) talk to each other else using sockets?Because both clients (both ends) connect TO a server that exists between them which Yahoo/MSN provides. That server has a public IP address.