Class

GioSocketAddressEnumerator

Description [src]

abstract class Gio.SocketAddressEnumerator : GObject.Object {
  /* No available fields */
}

GSocketAddressEnumerator is an enumerator type for GSocketAddress instances. It is returned by enumeration functions such as g_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 g_socket_address_enumerator_next_async() and g_socket_address_enumerator_next_finish() should be used where possible.

Each GSocketAddressEnumerator can only be enumerated once. Once g_socket_address_enumerator_next() has returned NULL, further enumeration with that GSocketAddressEnumerator is not possible, and it can be unreffed.

Hierarchy

hierarchy this GSocketAddressEnumerator ancestor_0 GObject ancestor_0--this

Ancestors

Instance methods

g_socket_address_enumerator_next

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.

g_socket_address_enumerator_next_async

Asynchronously retrieves the next GSocketAddress from enumerator and then calls callback, which must call g_socket_address_enumerator_next_finish() to get the result.

g_socket_address_enumerator_next_finish

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.

Methods inherited from GObject (43)

Signals

Signals inherited from GObject (1)

Class structure

struct GioSocketAddressEnumeratorClass {
  GSocketAddress* (* next) (
    GSocketAddressEnumerator* enumerator,
    GCancellable* cancellable,
    GError** error
  );
  void (* next_async) (
    GSocketAddressEnumerator* enumerator,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  );
  GSocketAddress* (* next_finish) (
    GSocketAddressEnumerator* enumerator,
    GAsyncResult* result,
    GError** error
  );
  
}
Class members
next
GSocketAddress* (* next) (
    GSocketAddressEnumerator* enumerator,
    GCancellable* cancellable,
    GError** error
  )
  No description available.
next_async
void (* next_async) (
    GSocketAddressEnumerator* enumerator,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data
  )
  No description available.
next_finish
GSocketAddress* (* next_finish) (
    GSocketAddressEnumerator* enumerator,
    GAsyncResult* result,
    GError** error
  )
  No description available.

Virtual methods

Gio.SocketAddressEnumeratorClass.next

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.

Gio.SocketAddressEnumeratorClass.next_async

Asynchronously retrieves the next GSocketAddress from enumerator and then calls callback, which must call g_socket_address_enumerator_next_finish() to get the result.

Gio.SocketAddressEnumeratorClass.next_finish

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.