network-mux-0.1.0.0: Multiplexing library
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Trace

Synopsis

Documentation

data MuxError Source #

Error type used in across the mux layer.

Constructors

MuxError 

Instances

Instances details
Show MuxError Source # 
Instance details

Defined in Network.Mux.Trace

Generic MuxError Source # 
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep MuxErrorTypeType Source #

Exception 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.1.0.0-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
Eq MuxErrorType Source # 
Instance details

Defined in Network.Mux.Trace

Show MuxErrorType Source # 
Instance details

Defined in Network.Mux.Trace

handleIOException ∷ MonadThrow m ⇒ StringIOException → 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
Eq MuxBearerState Source # 
Instance details

Defined in Network.Mux.Trace

Show 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
(Show peerid, Show a) ⇒ Show (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

showsPrecIntWithMuxBearer peerid a → ShowS Source #

showWithMuxBearer peerid a → String Source #

showList ∷ [WithMuxBearer peerid a] → ShowS Source #

Generic (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep (WithMuxBearer peerid a) ∷ TypeType Source #

Methods

fromWithMuxBearer peerid a → Rep (WithMuxBearer peerid a) x Source #

toRep (WithMuxBearer peerid a) x → WithMuxBearer peerid a Source #

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.1.0.0-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
Functor (TraceLabelPeer peerid) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

fmap ∷ (a → b) → TraceLabelPeer peerid a → TraceLabelPeer peerid b Source #

(<$) ∷ a → TraceLabelPeer peerid b → TraceLabelPeer peerid a Source #

(Eq peerid, Eq a) ⇒ Eq (TraceLabelPeer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

(==)TraceLabelPeer peerid a → TraceLabelPeer peerid a → Bool Source #

(/=)TraceLabelPeer peerid a → TraceLabelPeer peerid a → Bool Source #

(Show peerid, Show a) ⇒ Show (TraceLabelPeer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Methods

showsPrecIntTraceLabelPeer peerid a → ShowS Source #

showTraceLabelPeer peerid a → String Source #

showList ∷ [TraceLabelPeer peerid a] → ShowS Source #