arduino-audio-tools
|
RTSPServerTaskless - Manual Multi-client RTSP Audio Streaming Server. More...
#include <RTSPServerTaskless.h>
Public Member Functions | |
RTSPServerTaskless (RTSPAudioStreamerBase< Platform > &streamer, int port=8554) | |
bool | begin () |
Start server. | |
bool | begin (const char *ssid, const char *password) |
int | clientCount () |
void | doLoop () |
Main server loop - call this frequently from Arduino loop() | |
void | end () |
operator bool () | |
void | setOnSessionPath (bool(*cb)(const char *path, void *ref), void *ref=nullptr) |
void | setSessionTimeoutMs (unsigned long ms) |
Protected Member Functions | |
void | acceptClient () |
Accept new client if none is active. | |
void | handleSession () |
Handle requests session if active. | |
Protected Attributes | |
Platform::TcpClientType | client |
int | client_count = 0 |
unsigned long | lastRequestTime = 0 |
bool(* | onSessionPathCb )(const char *, void *) = nullptr |
void * | onSessionPathRef = nullptr |
int | port = 554 |
RtspSession< Platform > * | rtspSession = nullptr |
Platform::TcpServerType * | server = nullptr |
unsigned long | sessionTimeoutMs = 60000 |
RTSPAudioStreamerBase< Platform > * | streamer = nullptr |
RTSPServerTaskless - Manual Multi-client RTSP Audio Streaming Server.
This class implements an RTSP audio streaming server for platforms like Arduino and ESP32, designed for environments where background tasks or threads are not available or desired.
RTSPServerTaskless inherits all protocol and session management logic from RTSPServerBase, but does not create any background tasks. Instead, it exposes a doLoop()
method that must be called frequently from the main Arduino loop (or equivalent) to handle client connections, session management, and audio streaming.
Key Features:
doLoop()
Platform | Target hardware platform (e.g., Arduino, ESP32) |
|
inlinevirtual |
Start server.
Reimplemented from RTSPServerBase< Platform >.