Function dns_lookup::getnameinfo [] [src]

pub fn getnameinfo(sock: &SocketAddr, flags: i32) -> Result<(String, String)>

Retrieve the name for a given IP and Service. Acts as a thin wrapper around the libc getnameinfo.

Returned names may be encoded in puny code for Interational Domain Names (UTF8 DNS names). You can use the idna crate to decode these to their actual UTF8 representation.

Retrieving names or services that contain non-UTF8 locales is currently not supported (as String is returned). Raise an issue if this is a concern for you.