Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.Mux.Trace
Synopsis
-
data
MuxError
=
MuxError
{
- errorType :: ! MuxErrorType
- errorMsg :: ! String
- data MuxErrorType
- handleIOException :: MonadThrow m => String -> IOException -> m a
-
data
MuxTrace
- = MuxTraceRecvHeaderStart
- | MuxTraceRecvHeaderEnd MuxSDUHeader
- | MuxTraceRecvDeltaQObservation MuxSDUHeader Time
- | MuxTraceRecvDeltaQSample Double Int Int Double Double Double Double String
- | MuxTraceRecvStart Int
- | MuxTraceRecvEnd Int
- | MuxTraceSendStart MuxSDUHeader
- | MuxTraceSendEnd
- | MuxTraceState MuxBearerState
- | MuxTraceCleanExit MiniProtocolNum MiniProtocolDir
- | MuxTraceExceptionExit MiniProtocolNum MiniProtocolDir SomeException
- | MuxTraceChannelRecvStart MiniProtocolNum
- | MuxTraceChannelRecvEnd MiniProtocolNum Int
- | MuxTraceChannelSendStart MiniProtocolNum Int
- | MuxTraceChannelSendEnd MiniProtocolNum
- | MuxTraceHandshakeStart
- | MuxTraceHandshakeClientEnd DiffTime
- | MuxTraceHandshakeServerEnd
- | forall e. Exception e => MuxTraceHandshakeClientError e DiffTime
- | forall e. Exception e => MuxTraceHandshakeServerError e
- | MuxTraceSDUReadTimeoutException
- | MuxTraceSDUWriteTimeoutException
- | MuxTraceStartEagerly MiniProtocolNum MiniProtocolDir
- | MuxTraceStartOnDemand MiniProtocolNum MiniProtocolDir
- | MuxTraceStartedOnDemand MiniProtocolNum MiniProtocolDir
- | MuxTraceTerminating MiniProtocolNum MiniProtocolDir
- | MuxTraceShutdown
- | MuxTraceTCPInfo StructTCPInfo Word16
- data MuxBearerState
- data WithMuxBearer peerid a = WithMuxBearer { }
- data TraceLabelPeer peerid a = TraceLabelPeer peerid a
Documentation
Error type used in across the mux layer.
Constructors
MuxError | |
Fields
|
Instances
Show MuxError Source # | |
Generic MuxError Source # | |
Exception MuxError Source # | |
Defined in Network.Mux.Trace Methods toException :: MuxError -> SomeException Source # fromException :: SomeException -> Maybe MuxError Source # displayException :: MuxError -> String Source # |
|
type Rep MuxError Source # | |
Defined in Network.Mux.Trace
type
Rep
MuxError
=
D1
('
MetaData
"MuxError" "Network.Mux.Trace" "network-mux-0.1.0.1-7ZKx91o48G8EWFMuCmTsQc" '
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
|
MuxDecodeError |
return by
|
MuxBearerClosed |
thrown by
|
MuxIngressQueueOverRun |
thrown by
|
MuxInitiatorOnly |
thrown when data arrives on a responder channel when the
mux was set up as an
|
MuxIOException IOException |
|
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
|
Instances
Eq MuxErrorType Source # | |
Defined in Network.Mux.Trace Methods (==) :: MuxErrorType -> MuxErrorType -> Bool Source # (/=) :: MuxErrorType -> MuxErrorType -> Bool Source # |
|
Show MuxErrorType Source # | |
Defined in Network.Mux.Trace |
handleIOException :: MonadThrow m => String -> IOException -> m a Source #
Handler for
IOException
s which wraps them in
MuxError
.
It is used various
MuxBearer
implementations:
*
socketAsMuxBearer
*
pipeAsMuxBearer
Enumeration of Mux events that can be traced.
Constructors
data MuxBearerState Source #
Constructors
Mature |
MuxBearer has successfully completed the handshake. |
Dead |
MuxBearer is dead and the underlying bearer has been closed. |
Instances
Eq MuxBearerState Source # | |
Defined in Network.Mux.Trace Methods (==) :: MuxBearerState -> MuxBearerState -> Bool Source # (/=) :: MuxBearerState -> MuxBearerState -> Bool Source # |
|
Show MuxBearerState Source # | |
Defined in Network.Mux.Trace |
data WithMuxBearer peerid a Source #
Type used for tracing mux events.
Constructors
WithMuxBearer | |
Instances
( Show peerid, Show a) => Show ( WithMuxBearer peerid a) Source # | |
Defined in Network.Mux.Trace |
|
Generic ( WithMuxBearer peerid a) Source # | |
Defined in Network.Mux.Trace Methods from :: WithMuxBearer peerid a -> Rep ( WithMuxBearer peerid a) x Source # to :: Rep ( WithMuxBearer peerid a) x -> WithMuxBearer peerid a Source # |
|
type Rep ( WithMuxBearer peerid a) Source # | |
Defined in Network.Mux.Trace
type
Rep
(
WithMuxBearer
peerid a) =
D1
('
MetaData
"WithMuxBearer" "Network.Mux.Trace" "network-mux-0.1.0.1-7ZKx91o48G8EWFMuCmTsQc" '
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
Tracer
s. This annotates tracer output as being
associated with a given peer identifier.
Constructors
TraceLabelPeer peerid a |
Instances
Functor ( TraceLabelPeer peerid) Source # | |
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 # | |
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 # | |
Defined in Network.Mux.Trace |