LiveKit C++ SDK
Real-time audio/video SDK for C++
Loading...
Searching...
No Matches
livekit::TextStreamReader Class Reference

#include <data_stream.h>

Public Member Functions

 TextStreamReader (const TextStreamInfo &info)
 Construct a reader from initial stream metadata.
 
 TextStreamReader (const TextStreamReader &)=delete
 
TextStreamReaderoperator= (const TextStreamReader &)=delete
 
bool readNext (std::string &out)
 
std::string readAll ()
 
const TextStreamInfoinfo () const noexcept
 Metadata associated with this stream.
 

Friends

class Room
 

Detailed Description

Reader for incoming text streams. Created internally by the SDK when a text stream header is received.

Member Function Documentation

◆ readAll()

std::string livekit::TextStreamReader::readAll ( )

Convenience: read entire stream into a single string. Blocks until the stream is closed.

◆ readNext()

bool livekit::TextStreamReader::readNext ( std::string &  out)

Blocking read of next text chunk. Returns false when the stream has ended.


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