ouroboros-network-protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.BlockFetch.Server

Synopsis

Documentation

data BlockFetchServer block point (m :: Type -> Type) a where Source #

Constructors

BlockFetchServer :: forall point (m :: Type -> Type) block a. (ChainRange point -> m (BlockFetchBlockSender block point m a)) -> a -> BlockFetchServer block point m a 

data BlockFetchBlockSender block point (m :: Type -> Type) a where Source #

Send batches of blocks, when a batch is sent loop using BlockFetchServer.

Constructors

SendMsgStartBatch :: forall (m :: Type -> Type) block point a. m (BlockFetchSendBlocks block point m a) -> BlockFetchBlockSender block point m a

Initiate a batch of blocks.

SendMsgNoBlocks :: forall (m :: Type -> Type) block point a. m (BlockFetchServer block point m a) -> BlockFetchBlockSender block point m a 

data BlockFetchSendBlocks block point (m :: Type -> Type) a where Source #

Stream batch of blocks

Constructors

SendMsgBlock :: forall block (m :: Type -> Type) point a. block -> m (BlockFetchSendBlocks block point m a) -> BlockFetchSendBlocks block point m a

Send a single block and recurse.

SendMsgBatchDone :: forall (m :: Type -> Type) block point a. m (BlockFetchServer block point m a) -> BlockFetchSendBlocks block point m a

End of the stream of block bodies.

blockFetchServerPeer :: forall block point (m :: Type -> Type) a. Functor m => BlockFetchServer block point m a -> Server (BlockFetch block point) 'NonPipelined ('BFIdle :: BlockFetch block point) m a Source #