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§
- Dgram
Param - The parameter of a
dgram/1answer: 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/1offer or answer: a 32-byte X25519 ephemeral public key encoded as 64 lowercase hexadecimal digits (docs/extensions.md, sectionenc). - Resume
Param - The parameter of a
resume/1token. - Select
Param - The parameter of a
select/1offer and answer (docs/roadmap.md, step 6). - ShmParam
- The parameter of a
shm/1answer: a 64-bit random segment identifier encoded as exactly 16 lowercase hexadecimal digits (docs/extensions.md, sectionshm). - Token
- One feature with a version, and an optional parameter.
Enums§
- Resume
Request - What an inlet asks for with its
resume/1token.
Constants§
- COMP
- The name of the lossless wire compression feature (
docs/extensions.md, sectioncomp,docs/roadmap.md, step 7). - DGRAM
- The name of the UDP transport.
docs/extensions.md, sectiondgram. - ENC
- The name of the negotiated encryption feature (
docs/extensions.md, sectionenc,docs/roadmap.md, step 14). - HEADER
- The header name, as it goes on the wire.
- HEADER_
KEY - The header name, as
crate::Headersstores it. - META
- The name of the in-band live metadata feature (
docs/extensions.md, sectionmeta,docs/roadmap.md, step 16). - RESUME
- The name of the resend feature.
docs/extensions.md, sectionresume. - 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, sectionshm,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/1is active in the agreed feature list. - comp_
request - True when the outlet can answer
comp/1for this request. - dgram_
answer - Read the
dgram/1answer 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/1token that an inlet offers for a numeric stream, orNonewhencompis disabled or the stream carries strings. - offer_
dgram - The
dgram/1token that an inlet offers, orNonewhen the configuration does not allowdgram. - offer_
enc - Build the
enc/1=<pubkey>offer token for an inlet. - offer_
resume - The
resume/1token that an inlet offers. - offer_
select - Build the
select/1offer token when selection is active and allowed. - offer_
shm - The
shm/1token that an inlet offers, orNonewhenshmis disabled. - parse
- Read a header value. A token with a bad form is left out.
- resume_
answer - Read the
resume/1answer of an outlet, on the inlet side. - resume_
request - Read the
resume/1request of an offer, on the outlet side. - select_
answer - Read the outlet’s confirmed
select/1answer on the inlet side. - select_
request - Validate an inlet’s
select/1offer 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/1for this request.