Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Enumerator type for objects that contain or generate
SocketAddress
<!-- -->es.
- newtype SocketAddressEnumerator = SocketAddressEnumerator (ManagedPtr SocketAddressEnumerator)
- class GObject o => IsSocketAddressEnumerator o
- toSocketAddressEnumerator :: IsSocketAddressEnumerator o => o -> IO SocketAddressEnumerator
- noSocketAddressEnumerator :: Maybe SocketAddressEnumerator
- data SocketAddressEnumeratorNextMethodInfo
- socketAddressEnumeratorNext :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe b -> m SocketAddress
- data SocketAddressEnumeratorNextAsyncMethodInfo
- socketAddressEnumeratorNextAsync :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SocketAddressEnumeratorNextFinishMethodInfo
- socketAddressEnumeratorNextFinish :: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsAsyncResult b) => a -> b -> m SocketAddress
Exported types
newtype SocketAddressEnumerator Source #
GObject SocketAddressEnumerator Source # | |
IsObject SocketAddressEnumerator Source # | |
IsSocketAddressEnumerator SocketAddressEnumerator Source # | |
((~) * info (ResolveSocketAddressEnumeratorMethod t SocketAddressEnumerator), MethodInfo * info SocketAddressEnumerator p) => IsLabel t (SocketAddressEnumerator -> p) Source # | |
((~) * info (ResolveSocketAddressEnumeratorMethod t SocketAddressEnumerator), MethodInfo * info SocketAddressEnumerator p) => IsLabelProxy t (SocketAddressEnumerator -> p) Source # | |
HasAttributeList * SocketAddressEnumerator Source # | |
type AttributeList SocketAddressEnumerator Source # | |
type SignalList SocketAddressEnumerator Source # | |
class GObject o => IsSocketAddressEnumerator o Source #
toSocketAddressEnumerator :: IsSocketAddressEnumerator o => o -> IO SocketAddressEnumerator Source #
Methods
next
data SocketAddressEnumeratorNextMethodInfo Source #
((~) * signature (Maybe b -> m SocketAddress), MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => MethodInfo * SocketAddressEnumeratorNextMethodInfo a signature Source # | |
socketAddressEnumeratorNext Source #
:: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m SocketAddress | Returns: a |
Retrieves the next SocketAddress
from enumerator
. Note that this
may block for some amount of time. (Eg, a NetworkAddress
may need
to do a DNS lookup before it can return an address.) Use
socketAddressEnumeratorNextAsync
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
socketAddressEnumeratorNext
will return an appropriate error
in *error
. However, if the first call to
socketAddressEnumeratorNext
succeeds, then any further
internal errors (other than cancellable
being triggered) will be
ignored.
nextAsync
data SocketAddressEnumeratorNextAsyncMethodInfo Source #
((~) * signature (Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) => MethodInfo * SocketAddressEnumeratorNextAsyncMethodInfo a signature Source # | |
socketAddressEnumeratorNextAsync Source #
:: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronously retrieves the next SocketAddress
from enumerator
and then calls callback
, which must call
socketAddressEnumeratorNextFinish
to get the result.
nextFinish
data SocketAddressEnumeratorNextFinishMethodInfo Source #
((~) * signature (b -> m SocketAddress), MonadIO m, IsSocketAddressEnumerator a, IsAsyncResult b) => MethodInfo * SocketAddressEnumeratorNextFinishMethodInfo a signature Source # | |
socketAddressEnumeratorNextFinish Source #
:: (HasCallStack, MonadIO m, IsSocketAddressEnumerator a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m SocketAddress | Returns: a |
Retrieves the result of a completed call to
socketAddressEnumeratorNextAsync
. See
socketAddressEnumeratorNext
for more information about
error handling.