I created a small chat program, that works flawlessly when client & server are run on the same computer (and probably network, too). However, as soon as I try to connec
First, test to see if it really works on a LAN; it sounds like you're just assuming it does.
If it works on your local network, perhaps it's failing because the server lacks a public IP, and is running behind a NAT'ing router.