v2.0.0
Loading...
Searching...
No Matches
LSLLIB::stream_outlet Class Reference

Server-side LSL endpoint: binds a TCP data server, advertises the stream on the LSL discovery multicast group, and fans samples out to every connected inlet. More...

#include <lsl_stream_outlet.h>

Public Member Functions

 stream_outlet (const stream_info &info)
 ~stream_outlet ()
void push_sample (const std::vector< float > &sample)
void push_chunk (const std::vector< std::vector< float > > &chunk)
stream_info info () const
bool have_consumers () const

Detailed Description

Server-side LSL endpoint: binds a TCP data server, advertises the stream on the LSL discovery multicast group, and fans samples out to every connected inlet.

Definition at line 67 of file lsl_stream_outlet.h.

Constructor & Destructor Documentation

◆ stream_outlet()

stream_outlet::stream_outlet ( const stream_info & info)
explicit

Construct a stream_outlet for the given stream_info.

This immediately starts the TCP data server and begins UDP discovery broadcasts.

Parameters
[in]infoThe stream_info describing this outlet's stream.

Definition at line 289 of file lsl_stream_outlet.cpp.

◆ ~stream_outlet()

stream_outlet::~stream_outlet ( )

Destructor. Stops broadcasting and closes all connections.

Definition at line 297 of file lsl_stream_outlet.cpp.

Member Function Documentation

◆ have_consumers()

bool stream_outlet::have_consumers ( ) const
nodiscard

Check whether any consumers are currently connected.

Returns
True if at least one inlet is connected.

Definition at line 325 of file lsl_stream_outlet.cpp.

◆ info()

stream_info stream_outlet::info ( ) const
nodiscard

Get the stream_info associated with this outlet (including the assigned data port).

Returns
The stream_info for this outlet.

Definition at line 318 of file lsl_stream_outlet.cpp.

◆ push_chunk()

void stream_outlet::push_chunk ( const std::vector< std::vector< float > > & chunk)

Push a chunk of multichannel samples into the outlet.

Parameters
[in]chunkA vector of samples, where each sample is a vector of channel values.

Definition at line 311 of file lsl_stream_outlet.cpp.

◆ push_sample()

void stream_outlet::push_sample ( const std::vector< float > & sample)

Push a single multichannel sample into the outlet.

Parameters
[in]sampleA vector of channel values (must match the stream's channel_count).

Definition at line 304 of file lsl_stream_outlet.cpp.


The documentation for this class was generated from the following files: