network-mux-0.1.0.1: Multiplexing library
Safe Haskell None
Language Haskell2010

Network.Mux.Compat

Synopsis

Documentation

Mux bearers

data MuxBearer m Source #

Low level access to underlying socket or pipe. There are three smart constructors:

Defining MuxApplication s

newtype MuxApplication (mode :: MuxMode ) m a b Source #

Constructors

MuxApplication [ MuxMiniProtocol mode m a b]

newtype MiniProtocolNum Source #

The wire format includes the protocol numbers, and it's vital that these are stable. They are not necessarily dense however, as new ones are added and some old ones retired. So we use a dedicated class for this rather than reusing Enum . This also covers unrecognised protocol numbers on the decoding side.

Instances

Instances details
Enum MiniProtocolNum Source #
Instance details

Defined in Network.Mux.Types

Eq MiniProtocolNum Source #
Instance details

Defined in Network.Mux.Types

Ord MiniProtocolNum Source #
Instance details

Defined in Network.Mux.Types

Show MiniProtocolNum Source #
Instance details

Defined in Network.Mux.Types

Ix MiniProtocolNum Source #
Instance details

Defined in Network.Mux.Types

data MiniProtocolLimits Source #

Per Miniprotocol limits

Constructors

MiniProtocolLimits

Fields

data MiniProtocolDir Source #

Instances

Instances details
Bounded MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Enum MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Eq MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Ord MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Show MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Ix MiniProtocolDir Source #
Instance details

Defined in Network.Mux.Types

Errors

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

Tracing

data WithMuxBearer peerid a Source #

Type used for tracing mux events.

Constructors

WithMuxBearer

Fields

Instances

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

Defined in Network.Mux.Trace

Generic ( WithMuxBearer peerid a) Source #
Instance details

Defined in Network.Mux.Trace

Associated Types

type Rep ( WithMuxBearer peerid a) :: Type -> Type 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.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)))