r/learnjava • u/holle197 • Sep 24 '19
Socket
Imagine i made java app with 2 class. Server and client. What i need to do if i want connect to my server using my app if i go to my neighbord house and on his computer? How do that?
1
Upvotes
3
u/Wolfhammer69 Sep 24 '19
Use your WAN IP's in the socket connections.
It really is no different than using LAN IP's for a local client/server, they are just endpoints, where they are physically doesn't mean much.
Make sure whatever port your using is allowed through your firewalls if you are using them and use NAT/open ports to point to the internal addresses as required for traffic on that port.