network-mux
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Types

Description

Types used by the multiplexer.

Synopsis

Documentation

data MiniProtocolInfo (mode :: Mode) Source #

A static description of a mini-protocol.

Constructors

MiniProtocolInfo 

Fields

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.

Constructors

MiniProtocolNum Word16 

Instances

Instances details
Enum MiniProtocolNum Source # 
Instance details

Defined in Network.Mux.Types

Ix MiniProtocolNum Source # 
Instance details

Defined in Network.Mux.Types

Show 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

newtype MiniProtocolLimits Source #

Per Miniprotocol limits

Constructors

MiniProtocolLimits 

Fields

  • maximumIngressQueue :: Int

    Limit on the maximum number of bytes that can be queued in the miniprotocol's ingress queue.

data Mode where Source #

Statically configured multiplexer mode.

Constructors

InitiatorMode :: Mode

Only execute initiator protocols. In this mode the multiplexer will only run its egress side.

ResponderMode :: Mode

Only execute responder protocols. It this mode the multiplexer will only run its ingress side.

InitiatorResponderMode :: Mode

Execute initiator and responder protocols. In this mode the multiplexer will run both ingress and egress sides.

data Status Source #

Constructors

Ready

Initial mux state, mux is ready to accept requests. It does not indicate weather mux thread was started or not.

Failed SomeException

Mux failed with SomeException

Stopping

Mux is being stopped; mux will not accept any new mini-protocols to start.

Stopped

Mux stopped.

Instances

Instances details
Show Status Source # 
Instance details

Defined in Network.Mux.Types

data MiniProtocolIx Source #

The index of a protocol in a MuxApplication, used for array indices

Instances

Instances details
Enum MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Ix MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Num MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Show MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Eq MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Ord MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

data MiniProtocolDir Source #

Constructors

InitiatorDir 
ResponderDir 

Instances

Instances details
Bounded MiniProtocolDir Source # 
Instance details

Defined in Network.Mux.Types

Enum MiniProtocolDir Source # 
Instance details

Defined in Network.Mux.Types

Ix MiniProtocolDir Source # 
Instance details

Defined in Network.Mux.Types

Show 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

data Bearer (m :: Type -> Type) Source #

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

Constructors

Bearer 

Fields

bearerAsChannel :: forall (m :: Type -> Type). Functor m => Bearer m -> MiniProtocolNum -> MiniProtocolDir -> ByteChannel m Source #

A channel which wraps each message as an SDU using giving MiniProtocolNum and MiniProtocolDir.

data SDU Source #

Constructors

SDU 

newtype SDUSize Source #

Constructors

SDUSize 

Fields

Instances

Instances details
Enum SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Generic SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Associated Types

type Rep SDUSize 
Instance details

Defined in Network.Mux.Types

type Rep SDUSize = D1 ('MetaData "SDUSize" "Network.Mux.Types" "network-mux-0.5-inplace" 'True) (C1 ('MetaCons "SDUSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSDUSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

Methods

from :: SDUSize -> Rep SDUSize x #

to :: Rep SDUSize x -> SDUSize #

Num SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Integral SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Real SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Show SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Eq SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Methods

(==) :: SDUSize -> SDUSize -> Bool #

(/=) :: SDUSize -> SDUSize -> Bool #

Ord SDUSize Source # 
Instance details

Defined in Network.Mux.Types

type Rep SDUSize Source # 
Instance details

Defined in Network.Mux.Types

type Rep SDUSize = D1 ('MetaData "SDUSize" "Network.Mux.Types" "network-mux-0.5-inplace" 'True) (C1 ('MetaCons "SDUSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSDUSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

remoteClockPrecision :: DiffTime Source #

The DiffTime represented by a tick in the RemoteClockModel