Skip to main content

Module features

Module features 

Source
Expand description

The feature header between two labstream peers. docs/extensions.md.

A labstream inlet offers features in the request header Labstream-Features, and a labstream outlet answers the ones that it accepts. liblsl reads only the header keys that it knows, on both sides (src/tcp_server.cpp:605-633, src/data_receiver.cpp:215-253), so a liblsl peer ignores the header and the connection stays plain LSL.

Both parsers cut a header line at the first ; and convert it to lowercase (src/tcp_server.cpp:610-613, crate::header). A token is therefore lowercase, and a parameter is hexadecimal.

Structs§

DgramParam
The parameter of a dgram/1 answer: the UDP port of the outlet in exactly 4 hexadecimal digits, then a cookie in exactly 16 hexadecimal digits.
EncParam
The parameter of an enc/1 offer or answer: a 32-byte X25519 ephemeral public key encoded as 64 lowercase hexadecimal digits (docs/extensions.md, section enc).
ResumeParam
The parameter of a resume/1 token.
SelectParam
The parameter of a select/1 offer and answer (docs/roadmap.md, step 6).
ShmParam
The parameter of a shm/1 answer: a 64-bit random segment identifier encoded as exactly 16 lowercase hexadecimal digits (docs/extensions.md, section shm).
Token
One feature with a version, and an optional parameter.

Enums§

ResumeRequest
What an inlet asks for with its resume/1 token.

Constants§

COMP
The name of the lossless wire compression feature (docs/extensions.md, section comp, docs/roadmap.md, step 7).
DGRAM
The name of the UDP transport. docs/extensions.md, section dgram.
ENC
The name of the negotiated encryption feature (docs/extensions.md, section enc, docs/roadmap.md, step 14).
HEADER
The header name, as it goes on the wire.
HEADER_KEY
The header name, as crate::Headers stores it.
META
The name of the in-band live metadata feature (docs/extensions.md, section meta, docs/roadmap.md, step 16).
RESUME
The name of the resend feature. docs/extensions.md, section resume.
SELECT
The name of the channel and rate selection feature (docs/roadmap.md, step 6).
SEQ
The name of the sequence number feature. crate::seq.
SHM
The name of the same-machine shared-memory transport (docs/extensions.md, section shm, docs/roadmap.md, step 9).
SUPPORTED
The features with no parameter that this library implements, each with its versions.

Functions§

agreed
The features that are on, from what the inlet offered and what the outlet answered.
answer
The outlet’s answer to an offer.
comp_answer
True when comp/1 is active in the agreed feature list.
comp_request
True when the outlet can answer comp/1 for this request.
dgram_answer
Read the dgram/1 answer of an outlet, on the inlet side.
dgram_request
True when the outlet can answer dgram/1.
enc_answer
Extract the outlet’s enc/1=<pubkey> answer on the inlet side.
enc_request
Extract the inlet’s enc/1=<pubkey> offer on the outlet side.
has
True when the list holds the feature at this version.
header_line
Write a whole header line, with its line end.
offer
The tokens that this process offers: each supported feature that the configuration allows, at each supported version.
offer_comp
The comp/1 token that an inlet offers for a numeric stream, or None when comp is disabled or the stream carries strings.
offer_dgram
The dgram/1 token that an inlet offers, or None when the configuration does not allow dgram.
offer_enc
Build the enc/1=<pubkey> offer token for an inlet.
offer_resume
The resume/1 token that an inlet offers.
offer_select
Build the select/1 offer token when selection is active and allowed.
offer_shm
The shm/1 token that an inlet offers, or None when shm is disabled.
parse
Read a header value. A token with a bad form is left out.
resume_answer
Read the resume/1 answer of an outlet, on the inlet side.
resume_request
Read the resume/1 request of an offer, on the outlet side.
select_answer
Read the outlet’s confirmed select/1 answer on the inlet side.
select_request
Validate an inlet’s select/1 offer against the outlet’s stream metadata.
shm_answer
Read the outlet’s shm/1=<id> answer on the inlet side.
shm_request
True when the outlet can answer shm/1 for this request.