I've been studying how to use sockets to make two java programs communicate.
Now, on each example I've gone through, they've always placed the "server side program" on the same computer on which the "client side program" was, and of course the IP set was either 127.0.0.1 , or simply "localhost".
Now, my question is: how do I get to communicate the two programs if one is on a computer, and one on another?
I've tried to set the IP as the one my computer has when connected to internet (the one I found simply by googling "what's my IP"), but that way it doesn't seems to work. Can anyone explain me better how I can make it work?