Skip to main content

Module data_stream

Module data_stream 

Source
Expand description

Draft-10 data stream header encoding and decoding.

Changes from draft-08:

  • extension_count โ†’ extension_headers_length (byte length, not count)
  • Datagram (0x01): no payload_length or object_status; payload is remaining bytes
  • DatagramStatus (0x02): gains extension_headers_length field

Structsยง

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

Enumsยง

StreamType
Stream type IDs for draft-10 data streams (same IDs as draft-08).

Functionsยง

encode_extensions ๐Ÿ”’
Encode extension bytes to the buffer (just writes the raw bytes).
read_extension_bytes ๐Ÿ”’
Read byte_len bytes of raw extension data from the buffer.