network-mux-0.1.0.0: Multiplexing library
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

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

  • maximumIngressQueue ∷ !Int

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

type IngressQueue m = StrictTVar m ByteString Source #

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

Eq MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Num MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Ord MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Show MiniProtocolIx Source # 
Instance details

Defined in Network.Mux.Types

Ix 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

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

data MuxBearer m Source #

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

Constructors

MuxBearer 

Fields

muxBearerAsChannel ∷ ∀ m. Functor m ⇒ MuxBearer m → MiniProtocolNumMiniProtocolDirChannel 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
Show SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Generic SDUSize Source # 
Instance details

Defined in Network.Mux.Types

Associated Types

type Rep SDUSizeTypeType Source #

Methods

fromSDUSizeRep SDUSize x Source #

toRep SDUSize x → SDUSize Source #

type Rep SDUSize Source # 
Instance details

Defined in Network.Mux.Types

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

remoteClockPrecisionDiffTime Source #

The DiffTime represented by a tick in the RemoteClockModel