network-mux
Safe HaskellNone
LanguageHaskell2010

Network.Mux.Types

Synopsis

Documentation

newtype MiniProtocolBundle (mode :: MuxMode) Source #

Application run by mux layer.

  • enumeration of client application, e.g. a wallet application communicating with a node using ChainSync and TxSubmission protocols; this only requires to run client side of each protocol.
  • enumeration of server applications: this application type is mostly useful tests.
  • enumeration of both client and server applications, e.g. a full node serving downstream peers using server side of each protocol and getting updates from upstream peers using client side of each of the protocols.

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 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 MuxBearer (m :: Type -> Type) Source #

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

Constructors

MuxBearer 

Fields

muxBearerAsChannel :: forall (m :: Type -> Type). Functor m => MuxBearer m -> MiniProtocolNum -> MiniProtocolDir -> Channel m Source #

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

data MuxSDU Source #

Constructors

MuxSDU 

newtype SDUSize Source #

Constructors

SDUSize 

Fields

Instances

Instances details
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.4.5.3-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 #

Show 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.4.5.3-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