Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- codecHandshake :: forall vNumber (m :: Type -> Type) failure. (MonadST m, Ord vNumber, Show failure) => CodecCBORTerm (failure, Maybe Int) vNumber -> Codec (Handshake vNumber Term) DeserialiseFailure m ByteString
- byteLimitsHandshake :: forall {k} (vNumber :: k). ProtocolSizeLimits (Handshake vNumber Term) ByteString
- timeLimitsHandshake :: forall {k} (vNumber :: k). ProtocolTimeLimits (Handshake vNumber Term)
- noTimeLimitsHandshake :: forall {k} (vNumber :: k). ProtocolTimeLimits (Handshake vNumber Term)
- encodeRefuseReason :: CodecCBORTerm fail vNumber -> RefuseReason vNumber -> Encoding
- decodeRefuseReason :: Show failure => CodecCBORTerm (failure, Maybe Int) vNumber -> Decoder s (RefuseReason vNumber)
- data VersionDataCodec bytes vNumber vData = VersionDataCodec {
- encodeData :: vNumber -> vData -> bytes
- decodeData :: vNumber -> bytes -> Either Text vData
- cborTermVersionDataCodec :: (vNumber -> CodecCBORTerm Text vData) -> VersionDataCodec Term vNumber vData
- nodeToNodeHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToNodeVersion Term) DeserialiseFailure m ByteString
- nodeToClientHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToClientVersion Term) DeserialiseFailure m ByteString
Documentation
codecHandshake :: forall vNumber (m :: Type -> Type) failure. (MonadST m, Ord vNumber, Show failure) => CodecCBORTerm (failure, Maybe Int) vNumber -> Codec (Handshake vNumber Term) DeserialiseFailure m ByteString Source #
codec. The Handshake
encodes proposed map in
ascending order and it expects to receive them in this order. This allows
to construct the map in linear time. There is also another limiting factor
to the number of versions on can present: the whole message must fit into
a single TCP segment.MsgProposeVersions
byteLimitsHandshake :: forall {k} (vNumber :: k). ProtocolSizeLimits (Handshake vNumber Term) ByteString Source #
Byte limits
timeLimitsHandshake :: forall {k} (vNumber :: k). ProtocolTimeLimits (Handshake vNumber Term) Source #
Time limits.
noTimeLimitsHandshake :: forall {k} (vNumber :: k). ProtocolTimeLimits (Handshake vNumber Term) Source #
encodeRefuseReason :: CodecCBORTerm fail vNumber -> RefuseReason vNumber -> Encoding Source #
decodeRefuseReason :: Show failure => CodecCBORTerm (failure, Maybe Int) vNumber -> Decoder s (RefuseReason vNumber) Source #
Version data codec
data VersionDataCodec bytes vNumber vData Source #
Codec for version data (vData
in code) exchanged by the handshake
protocol.
Note: extra
type param is instantiated to DictVersion
; agreedOptions
is instantiated to NodeToNodeVersionData
in Ouroboros.Network.NodeToNode
or to ()
in Ouroboros.Network.NodeToClient.
VersionDataCodec | |
|
cborTermVersionDataCodec :: (vNumber -> CodecCBORTerm Text vData) -> VersionDataCodec Term vNumber vData Source #
NodeToNode & NodeToClient Codecs
nodeToNodeHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToNodeVersion Term) DeserialiseFailure m ByteString Source #
Handshake
codec for the node-to-node
protocol suite.
nodeToClientHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToClientVersion Term) DeserialiseFailure m ByteString Source #
Handshake
codec for the node-to-client
protocol suite.