network-mux
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Trace

Synopsis

Documentation

data Error Source #

Enumeration of error conditions.

Constructors

UnknownMiniProtocol MiniProtocolNum

returned by decodeSDUHeader, thrown by Bearer.

BearerClosed String

thrown by Bearer when received a null byte.

IngressQueueOverRun MiniProtocolNum MiniProtocolDir

thrown by demux when violating maximumIngressQueue byte limit.

InitiatorOnly MiniProtocolNum

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

IOException IOException String

IOException thrown by

SDUDecodeError String

return by decodeSDUHeader, thrown by Bearer.

SDUReadTimeout

thrown when reading of a single SDU takes too long

SDUWriteTimeout

thrown when writing a single SDU takes too long

Shutdown (Maybe SomeException) Status

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.

Instances

Instances details
Exception Error Source # 
Instance details

Defined in Network.Mux.Trace

Show Error Source # 
Instance details

Defined in Network.Mux.Trace

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

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

Handler for IOExceptions which wraps them in Error.

It is used various Bearer implementations: * socketAsBearer * pipeAsBearer

data BearerState Source #

Constructors

Mature

Bearer has successfully completed the handshake.

Dead

Bearer is dead and the underlying bearer has been closed.

Instances

Instances details
Show BearerState Source # 
Instance details

Defined in Network.Mux.Trace

Eq BearerState Source # 
Instance details

Defined in Network.Mux.Trace

data WithBearer peerid a Source #

Type used for tracing mux events.

Constructors

WithBearer 

Fields

  • wbPeerId :: !peerid

    A tag that should identify a specific mux bearer.

  • wbEvent :: !a
     

Instances

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

Defined in Network.Mux.Trace

Associated Types

type Rep (WithBearer peerid a) 
Instance details

Defined in Network.Mux.Trace

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

Methods

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

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

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

Defined in Network.Mux.Trace

Methods

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

show :: WithBearer peerid a -> String #

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

type Rep (WithBearer peerid a) Source # 
Instance details

Defined in Network.Mux.Trace

type Rep (WithBearer peerid a) = D1 ('MetaData "WithBearer" "Network.Mux.Trace" "network-mux-0.5-inplace" 'False) (C1 ('MetaCons "WithBearer" 'PrefixI 'True) (S1 ('MetaSel ('Just "wbPeerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 peerid) :*: S1 ('MetaSel ('Just "wbEvent") '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 #