Safe Haskell | None |
---|---|
Language | Haskell2010 |
Types used by the multiplexer.
Synopsis
- data MiniProtocolInfo (mode :: Mode) = MiniProtocolInfo {}
- newtype MiniProtocolNum = MiniProtocolNum Word16
- data MiniProtocolDirection (mode :: Mode) where
- newtype MiniProtocolLimits = MiniProtocolLimits {}
- data Mode where
- type family HasInitiator (mode :: Mode) :: Bool where ...
- type family HasResponder (mode :: Mode) :: Bool where ...
- data Status
- type IngressQueue (m :: Type -> Type) = StrictTVar m ByteString
- data MiniProtocolIx
- data MiniProtocolDir
- protocolDirEnum :: forall (mode :: Mode). MiniProtocolDirection mode -> MiniProtocolDir
- data MiniProtocolState (mode :: Mode) (m :: Type -> Type) = MiniProtocolState {}
- data MiniProtocolStatus
- data Bearer (m :: Type -> Type) = Bearer {}
- bearerAsChannel :: forall (m :: Type -> Type). Functor m => Bearer m -> MiniProtocolNum -> MiniProtocolDir -> ByteChannel m
- data SDU = SDU {
- msHeader :: !SDUHeader
- msBlob :: !ByteString
- data SDUHeader = SDUHeader {}
- newtype SDUSize = SDUSize {
- getSDUSize :: Word16
- msTimestamp :: SDU -> RemoteClockModel
- setTimestamp :: SDU -> RemoteClockModel -> SDU
- msNum :: SDU -> MiniProtocolNum
- msDir :: SDU -> MiniProtocolDir
- msLength :: SDU -> Word16
- newtype RemoteClockModel = RemoteClockModel {}
- remoteClockPrecision :: DiffTime
- data RuntimeError
Documentation
data MiniProtocolInfo (mode :: Mode) Source #
A static description of a mini-protocol.
MiniProtocolInfo | |
|
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
data MiniProtocolDirection (mode :: Mode) where Source #
Instances
Eq (MiniProtocolDirection mode) Source # | |
Defined in Network.Mux.Types (==) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # (/=) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # | |
Ord (MiniProtocolDirection mode) Source # | |
Defined in Network.Mux.Types compare :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Ordering # (<) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # (<=) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # (>) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # (>=) :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> Bool # max :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> MiniProtocolDirection mode # min :: MiniProtocolDirection mode -> MiniProtocolDirection mode -> MiniProtocolDirection mode # |
newtype MiniProtocolLimits Source #
Per Miniprotocol limits
MiniProtocolLimits | |
|
Statically configured multiplexer mode.
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. |
type family HasInitiator (mode :: Mode) :: Bool where ... Source #
type family HasResponder (mode :: Mode) :: Bool where ... Source #
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 |
Stopping | Mux is being stopped; mux will not accept any new mini-protocols to start. |
Stopped | Mux stopped. |
type IngressQueue (m :: Type -> Type) = StrictTVar m ByteString Source #
data MiniProtocolIx Source #
The index of a protocol in a MuxApplication, used for array indices
Instances
data MiniProtocolDir Source #
Instances
protocolDirEnum :: forall (mode :: Mode). MiniProtocolDirection mode -> MiniProtocolDir Source #
data MiniProtocolStatus Source #
Instances
Show MiniProtocolStatus Source # | |
Defined in Network.Mux.Types showsPrec :: Int -> MiniProtocolStatus -> ShowS # show :: MiniProtocolStatus -> String # showList :: [MiniProtocolStatus] -> ShowS # | |
Eq MiniProtocolStatus Source # | |
Defined in Network.Mux.Types (==) :: MiniProtocolStatus -> MiniProtocolStatus -> Bool # (/=) :: MiniProtocolStatus -> MiniProtocolStatus -> Bool # |
data Bearer (m :: Type -> Type) Source #
Low level access to underlying socket or pipe. There are three smart constructors:
socketAsBearer
pipeAsBearer
Test.Mux.queuesAsBearer
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
.
SDUHeader | |
|
Instances
Enum SDUSize Source # | |||||
Generic SDUSize Source # | |||||
Defined in Network.Mux.Types
| |||||
Num SDUSize Source # | |||||
Integral SDUSize Source # | |||||
Defined in Network.Mux.Types | |||||
Real SDUSize Source # | |||||
Defined in Network.Mux.Types toRational :: SDUSize -> Rational # | |||||
Show SDUSize Source # | |||||
Eq SDUSize Source # | |||||
Ord SDUSize Source # | |||||
type Rep SDUSize Source # | |||||
Defined in Network.Mux.Types |
msTimestamp :: SDU -> RemoteClockModel Source #
setTimestamp :: SDU -> RemoteClockModel -> SDU Source #
msNum :: SDU -> MiniProtocolNum Source #
msDir :: SDU -> MiniProtocolDir Source #
newtype RemoteClockModel Source #
Instances
Bounded RemoteClockModel Source # | |
Defined in Network.Mux.Types | |
Eq RemoteClockModel Source # | |
Defined in Network.Mux.Types (==) :: RemoteClockModel -> RemoteClockModel -> Bool # (/=) :: RemoteClockModel -> RemoteClockModel -> Bool # |
remoteClockPrecision :: DiffTime Source #
The DiffTime
represented by a tick in the RemoteClockModel
data RuntimeError Source #
ProtocolAlreadyRunning !MiniProtocolNum !MiniProtocolDir !MiniProtocolStatus | |
UnknownProtocolInternalError !MiniProtocolNum !MiniProtocolDir | |
BlockedOnCompletionVar !MiniProtocolNum |
Instances
Exception RuntimeError Source # | |
Defined in Network.Mux.Types | |
Show RuntimeError Source # | |
Defined in Network.Mux.Types showsPrec :: Int -> RuntimeError -> ShowS # show :: RuntimeError -> String # showList :: [RuntimeError] -> ShowS # |