Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- codecHandshake :: forall vNumber m failure. ( MonadST m, Ord vNumber, Show failure) => CodecCBORTerm (failure, Maybe Int ) vNumber -> Codec ( Handshake vNumber Term ) DeserialiseFailure m ByteString
- byteLimitsHandshake :: forall vNumber. ProtocolSizeLimits ( Handshake vNumber Term ) ByteString
- timeLimitsHandshake :: forall vNumber. ProtocolTimeLimits ( Handshake vNumber Term )
- noTimeLimitsHandshake :: forall vNumber. 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
Documentation
codecHandshake :: forall vNumber m 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 vNumber. ProtocolSizeLimits ( Handshake vNumber Term ) ByteString Source #
Byte limits
timeLimitsHandshake :: forall vNumber. ProtocolTimeLimits ( Handshake vNumber Term ) Source #
Time limits.
noTimeLimitsHandshake :: forall vNumber. 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 #