network-mux
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Trace

Synopsis

Documentation

data MuxError Source #

Error type used in across the mux layer.

Constructors

MuxError 

Instances

Instances details
Exception MuxError Source # 
Instance details

Defined in Network.Mux.Trace

Generic MuxError Source # 
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep MuxError 
Instance details

Defined in Network.Mux.Trace

type Rep MuxError = D1 ('MetaData "MuxError" "Network.Mux.Trace" "network-mux-0.4.5.3-inplace" 'False) (C1 ('MetaCons "MuxError" 'PrefixI 'True) (S1 ('MetaSel ('Just "errorType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MuxErrorType) :*: S1 ('MetaSel ('Just "errorMsg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))

Methods

from :: MuxError -> Rep MuxError x #

to :: Rep MuxError x -> MuxError #

Show MuxError Source # 
Instance details

Defined in Network.Mux.Trace

type Rep MuxError Source # 
Instance details

Defined in Network.Mux.Trace

type Rep MuxError = D1 ('MetaData "MuxError" "Network.Mux.Trace" "network-mux-0.4.5.3-inplace" 'False) (C1 ('MetaCons "MuxError" 'PrefixI 'True) (S1 ('MetaSel ('Just "errorType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MuxErrorType) :*: S1 ('MetaSel ('Just "errorMsg") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 String)))

data MuxErrorType Source #

Enumeration of error conditions.

Constructors

MuxUnknownMiniProtocol

returned by decodeMuxSDUHeader, thrown by MuxBearer.

MuxDecodeError

return by decodeMuxSDUHeader, thrown by MuxBearer.

MuxBearerClosed

thrown by MuxBearer when received a null byte.

MuxIngressQueueOverRun

thrown by demux when violating maximumIngressQueue byte limit.

MuxInitiatorOnly

thrown when data arrives on a responder channel when the mux was set up as an InitiatorApp.

MuxIOException IOException

IOException thrown by

MuxSDUReadTimeout

thrown when reading of a single SDU takes too long

MuxSDUWriteTimeout

thrown when writing a single SDU takes too long

MuxShutdown !(Maybe MuxErrorType)

Result of runMiniProtocol's completionAction in case of an error or mux being closed while a mini-protocol was still running, this is not a clean exit.

MuxCleanShutdown

Mux stopped by stopMux

Instances

Instances details
Show MuxErrorType Source # 
Instance details

Defined in Network.Mux.Trace

Eq MuxErrorType Source # 
Instance details

Defined in Network.Mux.Trace

handleIOException :: MonadThrow m => String -> IOException -> m a Source #

Handler for IOExceptions which wraps them in MuxError.

It is used various MuxBearer implementations: * socketAsMuxBearer * pipeAsMuxBearer

data MuxBearerState Source #

Constructors

Mature

MuxBearer has successfully completed the handshake.

Dead

MuxBearer is dead and the underlying bearer has been closed.

Instances

Instances details
Show MuxBearerState Source # 
Instance details

Defined in Network.Mux.Trace

Eq MuxBearerState Source # 
Instance details

Defined in Network.Mux.Trace

data WithMuxBearer peerid a Source #

Type used for tracing mux events.

Constructors

WithMuxBearer 

Fields

  • wmbPeerId :: !peerid

    A tag that should identify a specific mux bearer.

  • wmbEvent :: !a
     

Instances

Instances details
Generic (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep (WithMuxBearer peerid a) 
Instance details

Defined in Network.Mux.Trace

type Rep (WithMuxBearer peerid a) = D1 ('MetaData "WithMuxBearer" "Network.Mux.Trace" "network-mux-0.4.5.3-inplace" 'False) (C1 ('MetaCons "WithMuxBearer" 'PrefixI 'True) (S1 ('MetaSel ('Just "wmbPeerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 peerid) :*: S1 ('MetaSel ('Just "wmbEvent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

Methods

from :: WithMuxBearer peerid a -> Rep (WithMuxBearer peerid a) x #

to :: Rep (WithMuxBearer peerid a) x -> WithMuxBearer peerid a #

(Show peerid, Show a) => Show (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

showsPrec :: Int -> WithMuxBearer peerid a -> ShowS #

show :: WithMuxBearer peerid a -> String #

showList :: [WithMuxBearer peerid a] -> ShowS #

type Rep (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

type Rep (WithMuxBearer peerid a) = D1 ('MetaData "WithMuxBearer" "Network.Mux.Trace" "network-mux-0.4.5.3-inplace" 'False) (C1 ('MetaCons "WithMuxBearer" 'PrefixI 'True) (S1 ('MetaSel ('Just "wmbPeerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 peerid) :*: S1 ('MetaSel ('Just "wmbEvent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

data TraceLabelPeer peerid a Source #

A peer label for use in Tracers. This annotates tracer output as being associated with a given peer identifier.

Constructors

TraceLabelPeer peerid a 

Instances

Instances details
Bifunctor TraceLabelPeer Source # 
Instance details

Defined in Network.Mux.Trace

Methods

bimap :: (a -> b) -> (c -> d) -> TraceLabelPeer a c -> TraceLabelPeer b d #

first :: (a -> b) -> TraceLabelPeer a c -> TraceLabelPeer b c #

second :: (b -> c) -> TraceLabelPeer a b -> TraceLabelPeer a c #

Functor (TraceLabelPeer peerid) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

fmap :: (a -> b) -> TraceLabelPeer peerid a -> TraceLabelPeer peerid b #

(<$) :: a -> TraceLabelPeer peerid b -> TraceLabelPeer peerid a #

(Show peerid, Show a) => Show (TraceLabelPeer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

showsPrec :: Int -> TraceLabelPeer peerid a -> ShowS #

show :: TraceLabelPeer peerid a -> String #

showList :: [TraceLabelPeer peerid a] -> ShowS #

(Eq peerid, Eq a) => Eq (TraceLabelPeer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

(==) :: TraceLabelPeer peerid a -> TraceLabelPeer peerid a -> Bool #

(/=) :: TraceLabelPeer peerid a -> TraceLabelPeer peerid a -> Bool #