Safe Haskell | None |
---|---|
Language | Haskell2010 |
GINI network utility functions.
Synopsis
- ipv4FromIpv6 :: HostAddress6 -> Maybe HostAddress
- ipv6FromIpv4 :: HostAddress -> HostAddress6
- peerFromSockAddr :: MonadThrow m => SockAddr -> m Peer
- resolveAddrs :: MonadIO m => Family -> SocketType -> HostName -> PortNumber -> m (NonEmpty SockAddr)
- resolvePeers :: (MonadIO m, MonadThrow m) => Family -> HostName -> PortNumber -> m (NonEmpty Peer)
- sinkTBQueue :: MonadIO m => TBQueue i -> ConduitT i o m ()
- sockAddrFromPeer :: MonadThrow m => Family -> Peer -> m SockAddr
- sourceTBQueue :: MonadIO m => TBQueue o -> ConduitT i o m ()
Documentation
ipv4FromIpv6 :: HostAddress6 -> Maybe HostAddress #
Extract an embedded IPv4 address from an IPv6 address, or
return Nothing
if it's a true IPv6 address.
ipv6FromIpv4 :: HostAddress -> HostAddress6 #
Embed an IPv4 address in an IPv6 address
peerFromSockAddr :: MonadThrow m => SockAddr -> m Peer #
resolveAddrs :: MonadIO m => Family -> SocketType -> HostName -> PortNumber -> m (NonEmpty SockAddr) #
Resolve a hostname to one or more SockAddr
s
An exception is thrown if the host cannot be resolved.
resolvePeers :: (MonadIO m, MonadThrow m) => Family -> HostName -> PortNumber -> m (NonEmpty Peer) #
Resolve a hostname to one or more Peer
s
An exception is thrown if the host cannot be resolved.
sinkTBQueue :: MonadIO m => TBQueue i -> ConduitT i o m () #
Conduit sink to TBQueue
.
sockAddrFromPeer :: MonadThrow m => Family -> Peer -> m SockAddr #
sourceTBQueue :: MonadIO m => TBQueue o -> ConduitT i o m () #
Conduit source from TBQueue
.