It derives from <GObject>.
<GSocketAddressEnumerator> is an
enumerator type for <GSocketAddress>
instances. It is returned by enumeration functions such as
socket-connectable:enumerate,
which returns a
<GSocketAddressEnumerator> to list
each <GSocketAddress> which could be used to
connect to that <GSocketConnectable>.
Enumeration is typically a blocking operation, so the asynchronous
methods socket-address-enumerator:next-async and
socket-address-enumerator:next-finish should be used
where possible.
Each <GSocketAddressEnumerator>
can only be enumerated once. Once socket-address-enumerator:next has returned NULL, further
enumeration with that
<GSocketAddressEnumerator> is not
possible, and it can be unreffed.
Retrieves the next <GSocketAddress> from
self. Note that this may block for some amount of time. (Eg, a
<GNetworkAddress> may need to do a DNS
lookup before it can return an address.) Use
socket-address-enumerator:next-async if you need to avoid
blocking.
If self is expected to yield addresses, but for some reason is
unable to (eg, because of a DNS error), then the first call to
socket-address-enumerator:next will return an appropriate error
in *error. However, if the first call to
socket-address-enumerator:next succeeds, then any further
internal errors (other than cancellable being triggered) will be
ignored.
Passed: a
<GSocketAddressEnumerator>.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a <GSocketAddress>, or #f.
a <GSocketAddress> (owned by the caller), or
#f on error (in which case *error will be set) or if there
are no more addresses.
Asynchronously retrieves the next
<GSocketAddress> from self and then
calls callback, which must call socket-address-enumerator:next-finish to get the result.
It is an error to call this multiple times before the previous callback has finished.
Passed: a
<GSocketAddressEnumerator>.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is satisfied
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
the data to pass to callback function
Retrieves the result of a completed call to
socket-address-enumerator:next-async. See
socket-address-enumerator:next for more information about error
handling.
Passed: a
<GSocketAddressEnumerator>.
Passed: a <GAsyncResult>.
Returned: a <GSocketAddress>, or #f.
a <GSocketAddress> (owned by the caller), or
#f on error (in which case *error will be set) or if there
are no more addresses.
Retrieves the next <GSocketAddress> from
self. Note that this may block for some amount of time. (Eg, a
<GNetworkAddress> may need to do a DNS
lookup before it can return an address.) Use
socket-address-enumerator:next-async if you need to avoid
blocking.
If self is expected to yield addresses, but for some reason is
unable to (eg, because of a DNS error), then the first call to
socket-address-enumerator:next will return an appropriate error
in *error. However, if the first call to
socket-address-enumerator:next succeeds, then any further
internal errors (other than cancellable being triggered) will be
ignored.
To override it in a new class, give register-type #:vfuncs
`((next . ,procedure)). The procedure is called as (procedure
self cancellable) ⇒ %return.
Passed: the class whose implementation to call:
<GSocketAddressEnumerator>, or a
class that derives from it, or its GType number.
Passed: a
<GSocketAddressEnumerator>.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Returned: a <GSocketAddress>, or #f.
a <GSocketAddress> (owned by the caller), or
#f on error (in which case *error will be set) or if there
are no more addresses.
Asynchronously retrieves the next
<GSocketAddress> from self and then
calls callback, which must call socket-address-enumerator:next-finish to get the result.
It is an error to call this multiple times before the previous callback has finished.
To override it in a new class, give register-type #:vfuncs
`((next-async . ,procedure)). The procedure is called as
(procedure self cancellable callback user-data).
Passed: the class whose implementation to call:
<GSocketAddressEnumerator>, or a
class that derives from it, or its GType number.
Passed: a
<GSocketAddressEnumerator>.
Passed, or left out: a <GCancellable>, or
#f.
optional <GCancellable> object, #f to
ignore.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is satisfied
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
the data to pass to callback function
Retrieves the result of a completed call to
socket-address-enumerator:next-async. See
socket-address-enumerator:next for more information about error
handling.
To override it in a new class, give register-type #:vfuncs
`((next-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call:
<GSocketAddressEnumerator>, or a
class that derives from it, or its GType number.
Passed: a
<GSocketAddressEnumerator>.
Passed: a <GAsyncResult>.
Returned: a <GSocketAddress>, or #f.
a <GSocketAddress> (owned by the caller), or
#f on error (in which case *error will be set) or if there
are no more addresses.