Resolver.lookupByAddress

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 GResolverError

If cancellable is non-NULL, it can be used to cancel the operation, in which case error (if non-NULL) will be set to G_IO_ERROR_CANCELLED.

class Resolver
string
lookupByAddress

Parameters

address InetAddress

the address to reverse-resolve

cancellable Cancellable

a gio.Cancellable, or NULL

Return Value

Type: string

a hostname (either ASCII-only, or in ASCII-encoded form), or NULL on error.

Throws

GException on failure.

Meta

Since

2.22