connection to the remote computer by socket

the computer which i want to access from my home is the computer of mine in the company. and i want to do this with socket programming.i will execute a java program listening the port 5101 for example.

my intranet IP is 10.10.20.84

so how can i create the socket?

Socket clientSocket=new Socket("***.***.***.***",5101); // public IP

or

Socket clientSocket=new Socket("10.10.20.84",5101); // private IP in the company

which one i will use to create a socket?

[481 byte] By [asilter] at [2008-2-3]
# 1
Hi,
you should give the ip of the machine which you want to connect to. Make sure that the machine is accessible from outside n/w.

Thanks,
Jaiprakash

JaiprakashSharma at 2007-9-9 > top of Msdn Tech,Visual J#,Visual J# General...