Reputation: 99
I do not understand how does it work. Can anyone explain me that from jni level? Does it call getnameinfo?
https://github.com/google/guava/blob/master/guava/src/com/google/common/net/InetAddresses.java
ok. How can i get name from an udp connection?
Upvotes: 0
Views: 642
Reputation: 35068
It does not get the hostname at all. ipStringToBytes
converts an IPv4 or IPv6 address into raw bytes and uses that to call bytesToInetAddress
which calls InetAddress.getByAddress which returns uses a raw IP address.
Upvotes: 0