I am wondering how I can detect if a socket is coming from localhost, that means the sockets is open on pc1 and connects to a server on pc1, i tried the address but i hav'nt got it to work, is there a call like isLocalhost() or somthing like that where i can test for a localhost socket?
Tried code:
if(socket.getInetAddress().getHostName().equalsIgnoreCase("127.0.0.1")) {
}
but sadly that didn't work, I also tried with the ipv6 but also that didn't trigger the if statement.
Thanks for your time.