Skip to main content

labstream_proto/
lib.rs

1//! The LSL protocol state machines.
2//!
3//! This crate holds no input and no output. It takes bytes and events, and it
4//! returns bytes and decisions. Every rule comes from `SPEC.md`, which cites
5//! the pinned oracle.
6//!
7//! The layering matters. liblsl parses a request inside a socket completion
8//! handler (`src/tcp_server.cpp:495-500`), so a test of that parser needs a
9//! network. Here a test calls a function with a byte slice.
10//!
11//! # Modules
12//!
13//! | Module | Holds |
14//! |---|---|
15//! | [`header`] | The header block parser and the status line |
16//! | [`negotiate`](negotiate::negotiate) | The server decision, as a pure function |
17//! | [`feed`] | The data feed state machine, client side |
18//! | [`discovery`] | The shortinfo query and answer |
19//! | [`timesync`] | The time probe and the offset estimator |
20//! | [`canon`] | The canonicalizer for transcript comparison |
21
22#![forbid(unsafe_code)]
23#![deny(missing_docs)]
24
25pub mod canon;
26pub mod comp;
27pub mod dgram;
28pub mod discovery;
29pub mod features;
30pub mod feed;
31pub mod header;
32pub mod meta;
33pub mod negotiate;
34pub mod select;
35pub mod seq;
36pub mod timesync;
37
38pub use header::{Error, Headers, StatusAction, StatusLine};
39pub use negotiate::{negotiate, Accepted, FeedRequest, Outcome, ServerStream};