network-mux-0.1.0.0: Multiplexing library
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Trace

Synopsis

Documentation

data MuxError Source #

Error type used in accross 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 MuxError :: Type -> Type #

Methods

from :: MuxError -> Rep MuxError x #

to :: Rep MuxError x -> MuxError #

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-9lGOxxFsgpyBkmgq5iX8kU" '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.

MuxCleanShutdown

Mux stopped by stopMux

MuxBlockedOnCompletionVar !MiniProtocolNum

Mux blocked on completionVar.

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 => String -> IOException -> m a Source #

Handler for IOExceptions which wrappes them in MuxError.

It is used various MuxBearer implementations: * socketAsMuxBearer * pipeAsMuxBearer

data MuxBearerState Source #

Constructors

Mature

MuxBearer has successufully 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

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

show :: WithMuxBearer peerid a -> String #

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

Generic (WithMuxBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep (WithMuxBearer peerid a) :: Type -> Type #

Methods

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

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

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-9lGOxxFsgpyBkmgq5iX8kU" '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 #

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

(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 #

(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 #