Gio.Resolver.prototype.lookup_by_address
function lookup_by_address(address: Gio.InetAddress, cancellable: Gio.Cancellable): String { // Gjs wrapper for g_resolver_lookup_by_address() }
Synchronously reverse-resolves address to determine its associated hostname.
If the DNS resolution fails, @error (if non-null) will be set to a value from Gio.ResolverError.
If cancellable is non-null, it can be used to cancel the operation, in which case @error (if non-null) will be set to Gio.IOErrorEnum.cancelled.
Since 2.22
- address
the address to reverse-resolve
- cancellable
a Gio.Cancellable, or null
- Returns
a hostname (either ASCII-only, or in ASCII-encoded form), or null on error.