Safe Haskell | None |
---|---|
Language | Haskell2010 |
Drivers for running
Peer
s with a
Codec
and a
Channel
.
Synopsis
- runPeer :: forall ps (st :: ps) pr failure bytes m a. ( MonadThrow m, Show failure, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> Channel m bytes -> Peer ps pr st m a -> m (a, Maybe bytes)
- runPeerWithLimits :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadFork m, MonadMask m, MonadThrow ( STM m), MonadMonotonicTime m, MonadTimer m, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps, Show failure) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> ProtocolSizeLimits ps bytes -> ProtocolTimeLimits ps -> Channel m bytes -> Peer ps pr st m a -> m (a, Maybe bytes)
-
data
TraceSendRecv
ps
where
- TraceSendMsg :: AnyMessageAndAgency ps -> TraceSendRecv ps
- TraceRecvMsg :: AnyMessageAndAgency ps -> TraceSendRecv ps
- runPipelinedPeer :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadThrow m, Show failure, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> Channel m bytes -> PeerPipelined ps pr st m a -> m (a, Maybe bytes)
- runPipelinedPeerWithLimits :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadFork m, MonadMask m, MonadThrow ( STM m), MonadMonotonicTime m, MonadTimer m, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps, Show failure) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> ProtocolSizeLimits ps bytes -> ProtocolTimeLimits ps -> Channel m bytes -> PeerPipelined ps pr st m a -> m (a, Maybe bytes)
Normal peers
runPeer :: forall ps (st :: ps) pr failure bytes m a. ( MonadThrow m, Show failure, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> Channel m bytes -> Peer ps pr st m a -> m (a, Maybe bytes) Source #
Run a peer with the given channel via the given codec.
This runs the peer to completion (if the protocol allows for termination).
runPeerWithLimits :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadFork m, MonadMask m, MonadThrow ( STM m), MonadMonotonicTime m, MonadTimer m, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps, Show failure) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> ProtocolSizeLimits ps bytes -> ProtocolTimeLimits ps -> Channel m bytes -> Peer ps pr st m a -> m (a, Maybe bytes) Source #
data TraceSendRecv ps where Source #
TraceSendMsg :: AnyMessageAndAgency ps -> TraceSendRecv ps | |
TraceRecvMsg :: AnyMessageAndAgency ps -> TraceSendRecv ps |
Instances
Show ( AnyMessageAndAgency ps) => Show ( TraceSendRecv ps) Source # | |
Defined in Ouroboros.Network.Driver.Simple |
Pipelined peers
runPipelinedPeer :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadThrow m, Show failure, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> Channel m bytes -> PeerPipelined ps pr st m a -> m (a, Maybe bytes) Source #
Run a pipelined peer with the given channel via the given codec.
This runs the peer to completion (if the protocol allows for termination).
Unlike normal peers, running pipelined peers rely on concurrency, hence the
MonadSTM
constraint.
runPipelinedPeerWithLimits :: forall ps (st :: ps) pr failure bytes m a. ( MonadAsync m, MonadFork m, MonadMask m, MonadThrow ( STM m), MonadMonotonicTime m, MonadTimer m, forall (st' :: ps). Show ( ClientHasAgency st'), forall (st' :: ps). Show ( ServerHasAgency st'), ShowProxy ps, Show failure) => Tracer m ( TraceSendRecv ps) -> Codec ps failure m bytes -> ProtocolSizeLimits ps bytes -> ProtocolTimeLimits ps -> Channel m bytes -> PeerPipelined ps pr st m a -> m (a, Maybe bytes) Source #
Run a pipelined peer with the given channel via the given codec.
This runs the peer to completion (if the protocol allows for termination).
Unlike normal peers, running pipelined peers rely on concurrency, hence the
MonadSTM
constraint.