erebos-0.1.5: Decentralized messaging and synchronization
Safe HaskellSafe-Inferred
LanguageHaskell2010

Erebos.Network.Protocol

Documentation

erebosNetworkProtocol :: (Eq addr, Ord addr, Show addr) => UnifiedIdentity -> (String -> STM ()) -> SymFlow (addr, ByteString) -> Flow (ControlRequest addr) (ControlMessage addr) -> IO () Source #

data Connection addr Source #

Instances

Instances details
Eq (Connection addr) Source # 
Instance details

Defined in Erebos.Network.Protocol

Methods

(==) :: Connection addr -> Connection addr -> Bool #

(/=) :: Connection addr -> Connection addr -> Bool #

connAddress :: Connection addr -> addr Source #

type RawStreamReader = Flow StreamPacket Void Source #

type RawStreamWriter = Flow Void StreamPacket Source #

data Flow r w Source #

type SymFlow a = Flow a a Source #

newFlow :: STM (Flow a b, Flow b a) Source #

newFlowIO :: IO (Flow a b, Flow b a) Source #

readFlow :: Flow r w -> STM r Source #

writeFlow :: Flow r w -> w -> STM () Source #

writeFlowBulk :: Flow r w -> [w] -> STM () Source #

tryWriteFlow :: Flow r w -> w -> STM Bool Source #

readFlowIO :: Flow r w -> IO r Source #

writeFlowIO :: Flow r w -> w -> IO () Source #

mapFlow :: (r -> r') -> (w' -> w) -> Flow r w -> Flow r' w' Source #