1.68 <GResolver>

Class: <GResolver>

It derives from <GObject>.

The object that handles DNS resolution. Use resolver:get-default to get the default resolver.

<GResolver> provides cancellable synchronous and asynchronous DNS resolution, for hostnames (resolver:lookup-by-address, resolver:lookup-by-name and their async variants) and SRV (service) records (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.

The default resolver (see resolver:get-default) has a timeout of 30s set on it since GLib 2.78. Earlier versions of GLib did not support resolver timeouts.

This is an abstract type; subclasses of it implement different resolvers for different platforms and situations.

Fields

parent-instance
priv

Properties

Property: resolver:timeout self

The timeout applied to all resolver lookups, in milliseconds.

This may be changed through the lifetime of the <GResolver>. The new value will apply to any lookups started after the change, but not to any already-ongoing lookups.

If this is 0, no timeout is applied to lookups.

No timeout was applied to lookups before this property was added in GLib 2.78.

Its value is an unsigned 32-bit integer.

Set it with (set! (resolver:timeout self) value).

Procedures

Procedure: resolver:get-default ⇒ %return

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.

%return

Returned: a <GResolver>.

the default <GResolver>.

Method: resolver:get-timeout self ⇒ %return
Method: get-timeout self ⇒ %return

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

self

Passed: a <GResolver>.

a <GResolver>

%return

Returned: an unsigned 32-bit integer.

the resolver timeout, in milliseconds, or 0 for no timeout

Method: resolver:lookup-by-address self address [cancellable] ⇒ %return
Method: lookup-by-address self address [cancellable] ⇒ %return

Synchronously reverse-resolves address to determine its associated hostname.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError>.

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

self

Passed: a <GResolver>.

a <GResolver>

address

Passed: a <GInetAddress>.

the address to reverse-resolve

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a string.

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

Method: resolver:lookup-by-address-async self address [cancellable] [callback]
Method: lookup-by-address-async self address [cancellable] [callback]

Begins asynchronously reverse-resolving address to determine its associated hostname, and eventually calls callback, which must call resolver:lookup-by-address-finish to get the final result.

self

Passed: a <GResolver>.

a <GResolver>

address

Passed: a <GInetAddress>.

the address to reverse-resolve

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Method: resolver:lookup-by-address-finish self result ⇒ %return
Method: lookup-by-address-finish self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-by-address-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a string.

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

Method: resolver:lookup-by-name self hostname [cancellable] ⇒ %return
Method: lookup-by-name self hostname [cancellable] ⇒ %return

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 inet-address:new-from-string).

On success, resolver:lookup-by-name will return a non-empty GList of <GInetAddress>, sorted in order of preference and guaranteed to not contain duplicates. That is, if using the result to connect to hostname, you should attempt to connect to the first address first, then the second if the first fails, etc. If you are using the result to listen on a socket, it is appropriate to add each result using e.g. socket-listener:add-address.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError> and #f will be returned.

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

If you are planning to connect to a socket on the resolved IP address, it may be easier to create a <GNetworkAddress> and use its <GSocketConnectable> interface.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GInetAddress>.

a non-empty GList of <GInetAddress>, or #f on error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)

Method: resolver:lookup-by-name-async self hostname [cancellable] [callback]
Method: lookup-by-name-async self hostname [cancellable] [callback]

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call resolver:lookup-by-name-finish to get the result. See resolver:lookup-by-name for more details.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up the address of

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Method: resolver:lookup-by-name-finish self result ⇒ %return
Method: lookup-by-name-finish self result ⇒ %return

Retrieves the result of a call to resolver:lookup-by-name-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GInetAddress>.

a GList of <GInetAddress>, or #f on error. See resolver:lookup-by-name for more details.

Method: resolver:lookup-by-name-with-flags self hostname flags [cancellable] ⇒ %return
Method: lookup-by-name-with-flags self hostname flags [cancellable] ⇒ %return

This differs from resolver:lookup-by-name in that you can modify the lookup behavior with flags. For example this can be used to limit results with ipv4-only.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up

flags

Passed: a <GResolverNameLookupFlags>, or a list of its symbols, or one of them.

extra <GResolverNameLookupFlags> for the lookup

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GInetAddress>.

a non-empty GList of <GInetAddress>, or #f on error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)

Method: resolver:lookup-by-name-with-flags-async self hostname flags [cancellable] [callback]
Method: lookup-by-name-with-flags-async self hostname flags [cancellable] [callback]

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call resolver:lookup-by-name-with-flags-finish to get the result. See resolver:lookup-by-name for more details.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up the address of

flags

Passed: a <GResolverNameLookupFlags>, or a list of its symbols, or one of them.

extra <GResolverNameLookupFlags> for the lookup

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Method: resolver:lookup-by-name-with-flags-finish self result ⇒ %return
Method: lookup-by-name-with-flags-finish self result ⇒ %return

Retrieves the result of a call to resolver:lookup-by-name-with-flags-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GInetAddress>.

a GList of <GInetAddress>, or #f on error. See resolver:lookup-by-name for more details.

Method: resolver:lookup-records self rrname record-type [cancellable] ⇒ %return
Method: lookup-records self rrname record-type [cancellable] ⇒ %return

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.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError> and #f will be returned.

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

self

Passed: a <GResolver>.

a <GResolver>

rrname

Passed: a string.

the DNS name to look up the record for

record-type

Passed: a <GResolverRecordType>, or one of its symbols.

the type of DNS record to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GVariant>.

a non-empty GList of <GVariant>, or #f on error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with variant:unref to do this.)

Method: resolver:lookup-records-async self rrname record-type [cancellable] [callback]
Method: lookup-records-async self rrname record-type [cancellable] [callback]

Begins asynchronously performing a DNS lookup for the given rrname, and eventually calls callback, which must call resolver:lookup-records-finish to get the final result. See resolver:lookup-records for more details.

self

Passed: a <GResolver>.

a <GResolver>

rrname

Passed: a string.

the DNS name to look up the record for

record-type

Passed: a <GResolverRecordType>, or one of its symbols.

the type of DNS record to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Method: resolver:lookup-records-finish self result ⇒ %return
Method: lookup-records-finish self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-records-async. Returns a non-empty list of records as <GVariant> tuples. See <GResolverRecordType> for information on what the records contain.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GVariant>.

a non-empty GList of <GVariant>, or #f on error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with variant:unref to do this.)

Method: resolver:lookup-service self service protocol domain [cancellable] ⇒ %return
Method: lookup-service self service protocol domain [cancellable] ⇒ %return

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.

On success, resolver:lookup-service will return a non-empty GList of <GSrvTarget>, sorted in order of preference. (That is, you should attempt to connect to the first target first, then the second if the first fails, etc.)

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError> and #f will be returned.

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

If you are planning to connect to the service, it is usually easier to create a <GNetworkService> and use its <GSocketConnectable> interface.

self

Passed: a <GResolver>.

a <GResolver>

service

Passed: a string.

the service type to look up (eg, "ldap")

protocol

Passed: a string.

the networking protocol to use for service (eg, "tcp")

domain

Passed: a string.

the DNS domain to look up the service in

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GSrvTarget>.

a non-empty GList of <GSrvTarget>, or #f on error. You must free each of the targets and the list when you are done with it. (You can use g_resolver_free_targets() to do this.)

Method: resolver:lookup-service-async self service protocol domain [cancellable] [callback]
Method: lookup-service-async self service protocol domain [cancellable] [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 resolver:lookup-service-finish to get the final result. See resolver:lookup-service for more details.

self

Passed: a <GResolver>.

a <GResolver>

service

Passed: a string.

the service type to look up (eg, "ldap")

protocol

Passed: a string.

the networking protocol to use for service (eg, "tcp")

domain

Passed: a string.

the DNS domain to look up the service in

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Method: resolver:lookup-service-finish self result ⇒ %return
Method: lookup-service-finish self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-service-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GSrvTarget>.

a non-empty GList of <GSrvTarget>, or #f on error. See resolver:lookup-service for more details.

Method: resolver:set-default self
Method: set-default self

Sets self to be the application’s default resolver (reffing self, and unreffing the previous default resolver, if any). Future calls to resolver:get-default will return this resolver.

This can be used if an application wants to perform any sort of DNS caching or "pinning"; it can implement its own <GResolver> that calls the original default resolver for DNS operations, and implements its own cache policies on top of that, and then set itself as the default resolver for all later code to use.

self

Passed: a <GResolver>.

the new default <GResolver>

Method: resolver:set-timeout self timeout-ms
Method: set-timeout self timeout-ms

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

self

Passed: a <GResolver>.

a <GResolver>

timeout-ms

Passed: an unsigned 32-bit integer.

timeout in milliseconds, or 0 for no timeouts

Signals

Signal: resolver:reload

Connect a handler with (connect object resolver:reload handler). It is called as (handler self).

Emitted when the resolver notices that the system resolver configuration has changed.

self

Passed: a <GResolver>.

Virtual methods

Virtual method: resolver:do-lookup-by-address implementor self address [cancellable] ⇒ %return

Synchronously reverse-resolves address to determine its associated hostname.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError>.

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

To override it in a new class, give register-type #:vfuncs `((lookup-by-address . ,procedure)). The procedure is called as (procedure self address cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

address

Passed: a <GInetAddress>.

the address to reverse-resolve

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a string.

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

Virtual method: resolver:do-lookup-by-address-async implementor self address [cancellable] [callback]

Begins asynchronously reverse-resolving address to determine its associated hostname, and eventually calls callback, which must call resolver:lookup-by-address-finish to get the final result.

To override it in a new class, give register-type #:vfuncs `((lookup-by-address-async . ,procedure)). The procedure is called as (procedure self address cancellable callback user-data).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

address

Passed: a <GInetAddress>.

the address to reverse-resolve

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Virtual method: resolver:do-lookup-by-address-finish implementor self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-by-address-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

To override it in a new class, give register-type #:vfuncs `((lookup-by-address-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a string.

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

Virtual method: resolver:do-lookup-by-name implementor self hostname [cancellable] ⇒ %return

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 inet-address:new-from-string).

On success, resolver:lookup-by-name will return a non-empty GList of <GInetAddress>, sorted in order of preference and guaranteed to not contain duplicates. That is, if using the result to connect to hostname, you should attempt to connect to the first address first, then the second if the first fails, etc. If you are using the result to listen on a socket, it is appropriate to add each result using e.g. socket-listener:add-address.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError> and #f will be returned.

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

If you are planning to connect to a socket on the resolved IP address, it may be easier to create a <GNetworkAddress> and use its <GSocketConnectable> interface.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name . ,procedure)). The procedure is called as (procedure self hostname cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GInetAddress>.

a non-empty GList of <GInetAddress>, or #f on error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)

Virtual method: resolver:do-lookup-by-name-async implementor self hostname [cancellable] [callback]

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call resolver:lookup-by-name-finish to get the result. See resolver:lookup-by-name for more details.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name-async . ,procedure)). The procedure is called as (procedure self hostname cancellable callback user-data).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up the address of

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Virtual method: resolver:do-lookup-by-name-finish implementor self result ⇒ %return

Retrieves the result of a call to resolver:lookup-by-name-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GInetAddress>.

a GList of <GInetAddress>, or #f on error. See resolver:lookup-by-name for more details.

Virtual method: resolver:do-lookup-by-name-with-flags implementor self hostname flags [cancellable] ⇒ %return

This differs from resolver:lookup-by-name in that you can modify the lookup behavior with flags. For example this can be used to limit results with ipv4-only.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name-with-flags . ,procedure)). The procedure is called as (procedure self hostname flags cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up

flags

Passed: a <GResolverNameLookupFlags>, or a list of its symbols, or one of them.

extra <GResolverNameLookupFlags> for the lookup

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GInetAddress>.

a non-empty GList of <GInetAddress>, or #f on error. You must unref each of the addresses and free the list when you are done with it. (You can use g_resolver_free_addresses() to do this.)

Virtual method: resolver:do-lookup-by-name-with-flags-async implementor self hostname flags [cancellable] [callback]

Begins asynchronously resolving hostname to determine its associated IP address(es), and eventually calls callback, which must call resolver:lookup-by-name-with-flags-finish to get the result. See resolver:lookup-by-name for more details.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name-with-flags-async . ,procedure)). The procedure is called as (procedure self hostname flags cancellable callback user-data).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

hostname

Passed: a string.

the hostname to look up the address of

flags

Passed: a <GResolverNameLookupFlags>, or a list of its symbols, or one of them.

extra <GResolverNameLookupFlags> for the lookup

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Virtual method: resolver:do-lookup-by-name-with-flags-finish implementor self result ⇒ %return

Retrieves the result of a call to resolver:lookup-by-name-with-flags-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

To override it in a new class, give register-type #:vfuncs `((lookup-by-name-with-flags-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GInetAddress>.

a GList of <GInetAddress>, or #f on error. See resolver:lookup-by-name for more details.

Virtual method: resolver:do-lookup-records implementor self rrname record-type [cancellable] ⇒ %return

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.

If the DNS resolution fails, error (if non-#f) will be set to a value from <GResolverError> and #f will be returned.

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

To override it in a new class, give register-type #:vfuncs `((lookup-records . ,procedure)). The procedure is called as (procedure self rrname record-type cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

rrname

Passed: a string.

the DNS name to look up the record for

record-type

Passed: a <GResolverRecordType>, or one of its symbols.

the type of DNS record to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

%return

Returned: a list, each a <GVariant>.

a non-empty GList of <GVariant>, or #f on error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with variant:unref to do this.)

Virtual method: resolver:do-lookup-records-async implementor self rrname record-type [cancellable] [callback]

Begins asynchronously performing a DNS lookup for the given rrname, and eventually calls callback, which must call resolver:lookup-records-finish to get the final result. See resolver:lookup-records for more details.

To override it in a new class, give register-type #:vfuncs `((lookup-records-async . ,procedure)). The procedure is called as (procedure self rrname record-type cancellable callback user-data).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

rrname

Passed: a string.

the DNS name to look up the record for

record-type

Passed: a <GResolverRecordType>, or one of its symbols.

the type of DNS record to look up

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>, or #f

callback

Passed, or left out: a procedure, or #f.

callback to call after resolution completes

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

data for callback

Virtual method: resolver:do-lookup-records-finish implementor self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-records-async. Returns a non-empty list of records as <GVariant> tuples. See <GResolverRecordType> for information on what the records contain.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

To override it in a new class, give register-type #:vfuncs `((lookup-records-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GVariant>.

a non-empty GList of <GVariant>, or #f on error. You must free each of the records and the list when you are done with it. (You can use g_list_free_full() with variant:unref to do this.)

Virtual method: resolver:do-lookup-service-async implementor self rrname [cancellable] [callback]

To override it in a new class, give register-type #:vfuncs `((lookup-service-async . ,procedure)). The procedure is called as (procedure self rrname cancellable callback user-data).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

rrname

Passed: a string.

cancellable

Passed, or left out: a <GCancellable>, or #f.

callback

Passed, or left out: a procedure, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

Virtual method: resolver:do-lookup-service-finish implementor self result ⇒ %return

Retrieves the result of a previous call to resolver:lookup-service-async.

If the DNS resolution failed, error (if non-#f) will be set to a value from <GResolverError>. If the operation was cancelled, error will be set to cancelled.

To override it in a new class, give register-type #:vfuncs `((lookup-service-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.

a <GResolver>

result

Passed: a <GAsyncResult>.

the result passed to your GAsyncReadyCallback

%return

Returned: a list, each a <GSrvTarget>.

a non-empty GList of <GSrvTarget>, or #f on error. See resolver:lookup-service for more details.

Virtual method: resolver:do-reload implementor self

To override it in a new class, give register-type #:vfuncs `((reload . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GResolver>, or a class that derives from it, or its GType number.

self

Passed: a <GResolver>.