Module stabilizer::net::data_stream

source ·
Expand description

Stabilizer data stream capabilities

§Design

Data streamining utilizes UDP packets to send live data streams at high throughput. Packets are always sent in a best-effort fashion, and data may be dropped.

Stabilizer organizes livestreamed data into batches within a “Frame” that will be sent as a UDP packet. Each frame consits of a header followed by sequential batch serializations. The packet header is constant for all streaming capabilities, but the serialization format after the header is application-defined.

§Frame Header

The header consists of the following, all in little-endian.

  • Magic word 0x057B (u16): a constant to identify Stabilizer streaming data.
  • Format Code (u8): a unique ID that indicates the serialization format of each batch of data in the frame. Refer to StreamFormat for further information.
  • Batch Count (u8): the number of batches of data.
  • Sequence Number (u32): an the sequence number of the first batch in the frame. This can be used to determine if and how many stream batches are lost.

§Example

A sample Python script is available in scripts/stream_throughput.py to demonstrate reception of livestreamed data.

Structs§

Enums§

Functions§