Skip to main content

Crate labstream_net

Crate labstream_net 

Source
Expand description

Sockets, timers, and interfaces for LSL.

This is the only crate in the workspace that touches the operating system. Every protocol rule lives in labstream-proto and labstream-wire, which hold no input and no output.

The split matters for testing. A protocol rule gets a unit test with a byte slice. Only this crate needs a network, and only its tests are allowed to be slow.

Re-exports§

pub use clock::ClockState;
pub use clock::LiveSource;
pub use config::Config;
pub use desc::Node;
pub use info::StreamInfo;
pub use inlet::build_property_query;
pub use inlet::read_fullinfo;
pub use inlet::resolve;
pub use inlet::Inlet;
pub use outlet::Outlet;
pub use queue::Fanout;
pub use queue::SampleQueue;
pub use resolver::ContinuousResolver;

Modules§

clock
The clock offset that an inlet measures against its outlet. SPEC.md 3.
config
The configuration file.
desc
The description tree, and the whole document that carries it.
info
The stream description, and the query subset that a resolver sends.
inlet
The inlet: a resolver and a TCP feed client.
outlet
The outlet: a discovery responder and a TCP feed server.
queue
A bounded sample queue that drops the oldest sample. SPEC.md 8.7.
resolver
The background resolver.
xpath
The query language that a resolver uses.

Constants§

BASE_PORT
The default base port. src/api_config.cpp:170.
MULTICAST_PORT
The port that carries a multicast or broadcast query.
PORT_RANGE
The default port range. src/api_config.cpp:171.
SESSION_ID
The session that a stream belongs to, when no file names another.

Functions§

clock
The clock that LSL timestamps use.
local_interface_indexes
The index of every interface on this machine, with zero at the front.
local_ipv4_addresses
Every local IPv4 address on this machine.
make_query_id
Build an opaque discovery token.
make_uid
Build a stream instance identifier.