Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

GLib::SocketAddressEnumerator

class GLib::SocketAddressEnumerator

Enumerator type for objects that contain or generate GLib::SocketAddresses?.

Instance Methods

next(cancellable = nil)

Retrieves the next GLib::SocketAddress from enumerator. Note that this may block for some amount of time. (For example, a GLib::NetworkAddress may need to do a DNS lookup before it can return an address.) Use Glib::SocketAddressEnumerator#next_async if you need to avoid blocking.

If enumerator is expected to yield addresses, but for some reason is unable to (for example, because of a DNS error), then the first call to GLib::SocketAddressEnumerator#next will raise an appropriate error. However, if the first call to GLib::SocketAddressEnumerator#next succeeds, then any further internal errors (other than cancellable being triggered) will be ignored.

next_async(cancellable = nil){ |result| }
Asynchronously retrieves the next GLib::SocketAddress from enumerator and then calls the passed block, which must call Glib::SocketAddress#next_finish to get the result.
next_finish(result)
Retrieves the result of a completed call to GLib::SocketAddressEnumerator#next_async. See GLib::SocketAddressEnumerator#next for more information about error handling.
Last modified:2010/12/27 21:59:23
Keyword(s):
References:[index-ruby-gio2] [index-ruby-glib2] [GLib::SocketConnectable] [GLib::SocketAddressEnumerator]