ouroboros-network-0.16.1.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.Diffusion.Utils

Documentation

withSockets Source #

Arguments

∷ ∀ m ntnFd ntnAddr ntcAddr a. (MonadCatch m, Typeable ntnAddr, Show ntnAddr) 
Tracer m (DiffusionTracer ntnAddr ntcAddr) 
Snocket m ntnFd ntnAddr 
→ (ntnFd → ntnAddr → m ())

configure a socket

→ (ntnFd → ntnAddr → m ())

configure a systemd socket

→ [Either ntnFd ntnAddr] 
→ (NonEmpty ntnFd → NonEmpty ntnAddr → m a) 
→ m a 

withLocalSocket ∷ ∀ ntnAddr ntcFd ntcAddr m a. (MonadThrow m, Typeable ntnAddr, Show ntnAddr) ⇒ Tracer m (DiffusionTracer ntnAddr ntcAddr) → (ntcFd → m FileDescriptor) → Snocket m ntcFd ntcAddr → Either ntcFd ntcAddr → (ntcFd → m a) → m a Source #