Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Draft-08 data stream header encoding and decoding.

Differences from draft-07:

  • Object headers include extension_count (varint) + raw extension bytes
  • Separate DatagramStatus type (0x02) for status-only datagrams
  • Datagram (0x01) includes extension_count + payload

StructsΒ§

DatagramHeader
Datagram header with payload (draft-08, type 0x01).
DatagramStatusHeader
Datagram status header (draft-08, type 0x02).
FetchHeader
Fetch stream header (follows the stream type varint).
FetchObjectHeader
Object within a fetch stream (draft-08).
ObjectHeader
Object within a subgroup stream (draft-08).
SubgroupHeader
Subgroup stream header (follows the stream type varint).

EnumsΒ§

Datagram
One datagram, of whichever shape its type field names.
StreamType
Every type ID this draft’s data plane assigns, from two separate tables.

FunctionsΒ§

check_end_of_track πŸ”’
Refuse an end-of-track object that does not end at object zero.
check_extension_count πŸ”’
Refuse an Extension Count that disagrees with the extension bytes beside it.
count_extensions πŸ”’
Count the extension headers in a raw block, or None if the bytes do not tile into whole headers.
datagram_type_error πŸ”’
Which failure a leading datagram type that is not one a reader wants is.
encode_extensions πŸ”’
Encode extension bytes back to the buffer.
skip_extensions πŸ”’
Skip over extensions in the buffer, reading extension_count varints.
stream_type_error πŸ”’
Which failure a leading unidirectional stream type that is not the one a reader wants is.