SocketAddressEnumerator
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.
Inheritors
Constructors
Functions
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.
Asynchronously retrieves the next #GSocketAddress from @enumerator and then calls @callback, which must call g_socket_address_enumerator_next_finish() to get the 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.