ThreadedResolver

#GThreadedResolver is an implementation of #GResolver which calls the libc lookup functions in threads to allow them to run asynchronously.

class ThreadedResolver : Resolver {}

Inherited Members

From Resolver

getDefault
gio.resolver.Resolver getDefault()

Gets the default #GResolver. You should unref it when you are done with it. #GResolver may use its reference count as a hint about how many threads it should allocate for concurrent DNS resolutions.

getTimeout
uint getTimeout()

Get the timeout applied to all resolver lookups. See #GResolver:timeout.

lookupByAddress
string lookupByAddress(gio.inet_address.InetAddress address, gio.cancellable.Cancellable cancellable)

Synchronously reverse-resolves address to determine its associated hostname.

lookupByAddressAsync
void lookupByAddressAsync(gio.inet_address.InetAddress address, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Begins asynchronously reverse-resolving address to determine its associated hostname, and eventually calls callback, which must call gio.resolver.Resolver.lookupByAddressFinish to get the final result.

lookupByAddressFinish
string lookupByAddressFinish(gio.async_result.AsyncResult result)

Retrieves the result of a previous call to gio.resolver.Resolver.lookupByAddressAsync.

lookupByName
gio.inet_address.InetAddress[] lookupByName(string hostname, gio.cancellable.Cancellable cancellable)

Synchronously resolves hostname to determine its associated IP address(es). hostname may be an ASCII-only or UTF-8 hostname, or the textual form of an IP address (in which case this just becomes a wrapper around gio.inet_address.InetAddress.newFromString).

lookupByNameAsync
void lookupByNameAsync(string hostname, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call gio.resolver.Resolver.lookupByNameFinish to get the result. See gio.resolver.Resolver.lookupByName for more details.

lookupByNameFinish
gio.inet_address.InetAddress[] lookupByNameFinish(gio.async_result.AsyncResult result)

Retrieves the result of a call to gio.resolver.Resolver.lookupByNameAsync.

lookupByNameWithFlags
gio.inet_address.InetAddress[] lookupByNameWithFlags(string hostname, gio.types.ResolverNameLookupFlags flags, gio.cancellable.Cancellable cancellable)

This differs from gio.resolver.Resolver.lookupByName in that you can modify the lookup behavior with flags. For example this can be used to limit results with gio.types.ResolverNameLookupFlags.Ipv4Only.

lookupByNameWithFlagsAsync
void lookupByNameWithFlagsAsync(string hostname, gio.types.ResolverNameLookupFlags flags, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call gio.resolver.Resolver.lookupByNameWithFlagsFinish to get the result. See gio.resolver.Resolver.lookupByName for more details.

lookupByNameWithFlagsFinish
gio.inet_address.InetAddress[] lookupByNameWithFlagsFinish(gio.async_result.AsyncResult result)

Retrieves the result of a call to gio.resolver.Resolver.lookupByNameWithFlagsAsync.

lookupRecords
glib.variant.VariantG[] lookupRecords(string rrname, gio.types.ResolverRecordType recordType, gio.cancellable.Cancellable cancellable)

Synchronously performs a DNS record lookup for the given rrname and returns a list of records as #GVariant tuples. See #GResolverRecordType for information on what the records contain for each record_type.

lookupRecordsAsync
void lookupRecordsAsync(string rrname, gio.types.ResolverRecordType recordType, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Begins asynchronously performing a DNS lookup for the given rrname, and eventually calls callback, which must call gio.resolver.Resolver.lookupRecordsFinish to get the final result. See gio.resolver.Resolver.lookupRecords for more details.

lookupRecordsFinish
glib.variant.VariantG[] lookupRecordsFinish(gio.async_result.AsyncResult result)

Retrieves the result of a previous call to gio.resolver.Resolver.lookupRecordsAsync. Returns a non-empty list of records as #GVariant tuples. See #GResolverRecordType for information on what the records contain.

lookupService
gio.srv_target.SrvTarget[] lookupService(string service, string protocol, string domain, gio.cancellable.Cancellable cancellable)

Synchronously performs a DNS SRV lookup for the given service and protocol in the given domain and returns an array of #GSrvTarget. domain may be an ASCII-only or UTF-8 hostname. Note also that the service and protocol arguments do not include the leading underscore that appears in the actual DNS entry.

lookupServiceAsync
void lookupServiceAsync(string service, string protocol, string domain, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Begins asynchronously performing a DNS SRV lookup for the given service and protocol in the given domain, and eventually calls callback, which must call gio.resolver.Resolver.lookupServiceFinish to get the final result. See gio.resolver.Resolver.lookupService for more details.

lookupServiceFinish
gio.srv_target.SrvTarget[] lookupServiceFinish(gio.async_result.AsyncResult result)

Retrieves the result of a previous call to gio.resolver.Resolver.lookupServiceAsync.

setDefault
void setDefault()

Sets resolver to be the application's default resolver (reffing resolver, and unreffing the previous default resolver, if any). Future calls to gio.resolver.Resolver.getDefault will return this resolver.

setTimeout
void setTimeout(uint timeoutMs)

Set the timeout applied to all resolver lookups. See #GResolver:timeout.

connectReload
ulong connectReload(T callback, Flag!"After" after)

Connect to Reload signal.