Class: Gio::SocketAddressEnumerator
- Inherits:
-
Object
- Object
- Gio::SocketAddressEnumerator
- Defined in:
- (unknown)
Overview
Class structure for GSocket::AddressEnumerator.
Instance Method Summary collapse
-
#next(cancellable) ⇒ Gio::SocketAddress
Retrieves the next GSocket::Address from enumerator.
-
#next_async(cancellable, callback, user_data) ⇒ nil
Asynchronously retrieves the next GSocket::Address from enumerator and then calls callback, which must call g_socket_address_enumerator_next_finish() to get the result.
-
#next_finish(result) ⇒ Gio::SocketAddress
Retrieves the result of a completed call to g_socket_address_enumerator_next_async().
Instance Method Details
#next(cancellable) ⇒ Gio::SocketAddress
Retrieves the next GSocket::Address from enumerator. Note that this may block for some amount of time. (Eg, a GNetwork::Address 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.
#next_async(cancellable, callback, user_data) ⇒ nil
Asynchronously retrieves the next GSocket::Address from enumerator and then calls callback, which must call g_socket_address_enumerator_next_finish() to get the result.
It is an error to call this multiple times before the previous callback has finished.
#next_finish(result) ⇒ Gio::SocketAddress
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.