Resolver
#GResolver provides cancellable synchronous and asynchronous DNS resolution, for hostnames (g_resolver_lookup_by_address(), g_resolver_lookup_by_name() and their async variants) and SRV (service) records (g_resolver_lookup_service()).
#GNetworkAddress and #GNetworkService provide wrappers around #GResolver functionality that also implement #GSocketConnectable, making it easy to connect to a remote host/service.
Constructors
Functions
Emitted when the resolver notices that the system resolver configuration has changed.
Synchronously reverse-resolves @address to determine its associated hostname.
Begins asynchronously reverse-resolving @address to determine its associated hostname, and eventually calls @callback, which must call g_resolver_lookup_by_address_finish() to get the final result.
Retrieves the result of a previous call to g_resolver_lookup_by_address_async().
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 g_inet_address_new_from_string()).
Begins asynchronously resolving @hostname to determine its associated IP address(es), and eventually calls @callback, which must call g_resolver_lookup_by_name_finish() to get the result. See g_resolver_lookup_by_name() for more details.
Retrieves the result of a call to g_resolver_lookup_by_name_async().
This differs from g_resolver_lookup_by_name() in that you can modify the lookup behavior with @flags. For example this can be used to limit results with %G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY.
Begins asynchronously resolving @hostname to determine its associated IP address(es), and eventually calls @callback, which must call g_resolver_lookup_by_name_with_flags_finish() to get the result. See g_resolver_lookup_by_name() for more details.
Retrieves the result of a call to g_resolver_lookup_by_name_with_flags_async().
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.
Begins asynchronously performing a DNS lookup for the given
Retrieves the result of a previous call to g_resolver_lookup_records_async(). Returns a non-empty list of records as #GVariant tuples. See #GResolverRecordType for information on what the records contain.
Synchronously performs a DNS SRV lookup for the given @service and
Begins asynchronously performing a DNS SRV lookup for the given
Retrieves the result of a previous call to g_resolver_lookup_service_async().
Sets @resolver to be the application's default resolver (reffing