i need to get the client IP n a socket connection. I need the IP alone with the port number (not using getRemoteAdress()).
help s much appreciated
Printable View
i need to get the client IP n a socket connection. I need the IP alone with the port number (not using getRemoteAdress()).
help s much appreciated
Why not use getInetAddress() or the like?
In ServletRequest I'm using following, able collect lots of details.
getRemoteAddr()
getRemoteHost()
getRemotePort()
Client can be end client or the proxy.
borrowing the thread a little, have somewhat the same problem. But the difference is that i dont want my local IP on the computer but instead the IP that i ISP delivers to me, been searching around for quite some time and haven't found anything :/. Anyone know any good way to get it?
How about capturing the response of netstat -n within your application on Windows. In Mac OS, you can find those details in System Preference, and I couldn't remember the direct way to access it.