hi in local area network this is working
//server
ServerSocket ss = new ServerSocket(2346);
//client
String hostname = "PCNaameHere";
Socket theSocket = new Socket(hostname, 2345);
then my question is some IP addresses are the same.
correct me if im wrong is IP addresses thesame with TCP IP? if not where to find IP addresses that is needed to use for WAN network.
what kind of IP address is needed?
on client side problem.
String hostname = "PCNaameHere"; //what should i put here.
Socket theSocket = new Socket(hostname, 2345);
i tried this code
then the output is
Net interface: lo
IP address: /127.0.0.1
Net interface: eth0
Net interface: eth1
IP address: /192.168.50.1
Net interface: ppp0
IP address: /10.157.10.50
is the last result "IP address: /10.157.10.50" is the ip address that is needed for
String hostname = "PCNaameHere"; //<-- is this IP address: 10.157.10.50 //< is this the ip that is needed?
Socket theSocket = new Socket(hostname, 2345);