How to get IP address of a remote computer which is not on LAN using socket programming.
Printable View
How to get IP address of a remote computer which is not on LAN using socket programming.
If your computer not in a LAN where you already connected, how can you see that?
I would like to give 1 example that if i m sitting in one building connected to office LAN and my friend is working in another company.So how I can get his IP address?
So indirectly it is connected to your LAN, isn't it?
Once a client/host connected to your server you will get a socket to communicate between them. If you have red about the Sockets in API you could find a method getInetAddress(), where you can get the IP.
Sir,
My actual problem is that i am trying to develop one application that can use for aggregate the bandwidth.
For instance,In college one LAB using Airtel internet with speed 2Mbps and another LAB using Reliance 3Mbps internet.then if one lab is close where we are using Airtel then how another reliance LAB and make use of Airtel Lab Bandwidth.
how we can recognize that how many different ways a computer is connected to internet using java?
Still you have a machine where acting like a server. It always connect to all the others PCs in your location, that's all. Is it clear?
Please tell me how we can find any computer in LAN is accessing internet or not using java?
Java really isn't the tool for this.
It has a hard enough time accessing things on the computer it's running on, let alone another computer somewhere on your LAN.
JNI are saying in this case?