Basics
Guides
API Reference
Basics
Guides
API Reference
[23:7] extends: object
GSocketAddressEnumerator is an enumerator type for
[class@Gio.SocketAddress] instances. It is returned by enumeration functions
such as [method@Gio.SocketConnectable.enumerate], which returns a
GSocketAddressEnumerator to list each [class@Gio.SocketAddress] which could
be used to connect to that [iface@Gio.SocketConnectable]. Enumeration is
typically a blocking operation, so the asynchronous methods
[method@Gio.SocketAddressEnumerator.next_async] and
[method@Gio.SocketAddressEnumerator.next_finish] should be used where
possible. Each GSocketAddressEnumerator can only be enumerated once. Once
[method@Gio.SocketAddressEnumerator.next] has returned NULL, further
enumeration with that GSocketAddressEnumerator is not possible, and it can
be unreffed.
SocketAddressEnumerator (Handle = null)
Creates a new
SocketAddressEnumeratorby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.next (object cancellable)
Retrieves the next #GSocketAddress from @enumerator. 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 g_socket_address_enumerator_next_async() if you need to avoid blocking. If @enumerator is expected to yield addresses, but for some reason is unable to (eg, because of a DNS error), then the first call to g_socket_address_enumerator_next() will return an appropriate error in
*error. However, if the first call to g_socket_address_enumerator_next() succeeds, then any further internal errors (other than @cancellable being triggered) will be ignored.
cancellable is optional #GCancellable object, %NULL to ignore..next_finish (object result)
Retrieves the result of a completed call to g_socket_address_enumerator_next_async(). See g_socket_address_enumerator_next() for more information about error handling.
result is a #GAsyncResult.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.