Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Draft-15 data stream header encoding and decoding.

Draft-15 data streams differ significantly from draft-14:

  • Subgroup stream types encode flags in the type byte. Section 10.4.2 Table 6 assigns twenty-four: 0x10-0x15, 0x18-0x1D, 0x30-0x35 and 0x38-0x3D.
  • Priority is absent when type & 0x20, and the object then inherits the priority the subscription established
  • type & 0x06 decides how the Subgroup ID is carried: it is zero, it is the first objectโ€™s ID, or it is a field on the wire. Table 6 states that as two columns โ€” Subgroup ID Field Present, and Subgroup ID Value โ€” not as a mode field, and the fourth combination is simply not a row in it
  • type & 0x08 marks a stream whose last object ends its group
  • Extensions flag (type & 0x01) affects per-object parsing
  • Fetch objects use serialization_flags for delta encoding
  • Object IDs in subgroups use delta encoding (first=absolute, subsequent=delta+1)

Structsยง

DatagramHeader
Datagram header for draft-15.
FetchHeader
Fetch stream header for draft-15.
FetchObjectHeader
One object on a draft-15 fetch stream, without its payload.
FetchObjectReader
Stateful reader/writer for the objects on one draft-15 fetch stream.
FetchObjectWriter
Re-encodes resolved fetch Objects onto one FETCH stream.
PriorFetchObject ๐Ÿ”’
The fields a draft-15 fetch object leaves to its successor to inherit.
SubgroupHeader
Subgroup stream header for draft-15.
SubgroupObject
One object within a draft-15 subgroup stream with its Object ID already resolved from the delta encoding.
SubgroupObjectMeta
The framing of one draft-15 subgroup object, without its payload.
SubgroupObjectReader
Stateful reader/writer for draft-15 subgroup objects.

Enumsยง

PayloadPermission
Whether an object carrying a given status may hold a non-empty payload.
SubgroupIdEncoding
How a draft-15 fetch object carries its Subgroup ID.

Constantsยง

FETCH_STREAM_TYPE ๐Ÿ”’
The unidirectional stream type draft-15 Section 10.4.4 gives a fetch stream.

Functionsยง

check_extensions_against_status_on_encode ๐Ÿ”’
Refuse an object that would be written with extension headers beside a status other than Normal.
datagram_type_is_assigned ๐Ÿ”’
Whether draft-15 Section 10.3.1 Table 5 assigns this datagram type.
decoded_status ๐Ÿ”’
Turn a wire Object Status code into the status draft-15 gives it, refusing any code the draft does not assign.
skip ๐Ÿ”’
Advance buf past len bytes without copying them.
stream_type_error ๐Ÿ”’
Which failure a leading unidirectional stream type that is not the one a reader wants is.
subgroup_type_is_assigned ๐Ÿ”’
Whether draft-15 Section 10.4.2 Table 6 assigns this subgroup stream type.