Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
AttenuatedChannel
m =
AttenuatedChannel
{
- acRead :: m ByteString
- acWrite :: ByteString -> m ()
- acClose :: m ()
- type Size = Int64
- data SuccessOrFailure
-
data
Attenuation
=
Attenuation
{
- aReadAttenuation :: Time -> Size -> ( DiffTime , SuccessOrFailure )
- aWriteAttenuation :: Maybe Int
- newConnectedAttenuatedChannelPair :: forall m. ( MonadLabelledSTM m, MonadTime m, MonadTimer m, MonadThrow m, MonadThrow ( STM m)) => Tracer m AttenuatedChannelTrace -> Tracer m AttenuatedChannelTrace -> Attenuation -> Attenuation -> STM m ( AttenuatedChannel m, AttenuatedChannel m)
- attenuationChannelAsMuxBearer :: forall m. ( MonadThrow m, MonadMonotonicTime m) => SDUSize -> DiffTime -> Tracer m MuxTrace -> AttenuatedChannel m -> MuxBearer m
- data AttenuatedChannelTrace
- resourceVanishedIOError :: String -> String -> IOError
Documentation
data AttenuatedChannel m Source #
An AttenuatedChannel supports:
-
attenuation applied after reading a message from
QueueChannel
; -
two-way close handshake with 120s timeout. Read side is closed as soon as
an internal
MsgClose
is received, write side has to be closed explicietly.
AttenuatedChannel | |
|
data Attenuation Source #
Attenuation of a channel.
Attenuation | |
|
newConnectedAttenuatedChannelPair :: forall m. ( MonadLabelledSTM m, MonadTime m, MonadTimer m, MonadThrow m, MonadThrow ( STM m)) => Tracer m AttenuatedChannelTrace -> Tracer m AttenuatedChannelTrace -> Attenuation -> Attenuation -> STM m ( AttenuatedChannel m, AttenuatedChannel m) Source #
Create a pair of connected
AttenuatedChannel
s.
attenuationChannelAsMuxBearer :: forall m. ( MonadThrow m, MonadMonotonicTime m) => SDUSize -> DiffTime -> Tracer m MuxTrace -> AttenuatedChannel m -> MuxBearer m Source #
Trace
data AttenuatedChannelTrace Source #