arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RTSPServerTaskless< Platform > Class Template Reference

RTSPServerTaskless - Manual Multi-client RTSP Audio Streaming Server. More...

#include <RTSPServerTaskless.h>

Inheritance diagram for RTSPServerTaskless< Platform >:
RTSPServerBase< Platform >

Public Member Functions

 RTSPServerTaskless (RTSPAudioStreamerBase< Platform > &streamer, int port=8554)
 
 ~RTSPServerTaskless ()
 
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
 
voidonSessionPathRef = nullptr
 
int port = 554
 
RtspSession< Platform > * rtspSession = nullptr
 
Platform::TcpServerType * server = nullptr
 
unsigned long sessionTimeoutMs = 60000
 
RTSPAudioStreamerBase< Platform > * streamer = nullptr
 

Detailed Description

template<typename Platform>
class audio_tools::RTSPServerTaskless< Platform >

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:

Template Parameters
PlatformTarget hardware platform (e.g., Arduino, ESP32)

Constructor & Destructor Documentation

◆ RTSPServerTaskless()

template<typename Platform >
RTSPServerTaskless ( RTSPAudioStreamerBase< Platform > &  streamer,
int  port = 8554 
)
inline

◆ ~RTSPServerTaskless()

template<typename Platform >
~RTSPServerTaskless ( )
inline

Member Function Documentation

◆ acceptClient()

template<typename Platform >
void acceptClient ( )
inlineprotectedinherited

Accept new client if none is active.

◆ begin() [1/2]

template<typename Platform >
bool begin ( )
inlinevirtual

Start server.

Reimplemented from RTSPServerBase< Platform >.

◆ begin() [2/2]

template<typename Platform >
bool begin ( const char ssid,
const char password 
)
inline

◆ clientCount()

template<typename Platform >
int clientCount ( )
inline

◆ doLoop()

template<typename Platform >
void doLoop ( )
inline

Main server loop - call this frequently from Arduino loop()

◆ end()

template<typename Platform >
void end ( )
inline

◆ handleSession()

template<typename Platform >
void handleSession ( )
inlineprotectedinherited

Handle requests session if active.

◆ operator bool()

template<typename Platform >
operator bool ( )
inline

◆ setOnSessionPath()

template<typename Platform >
void setOnSessionPath ( bool(*)(const char *path, void *ref)  cb,
void ref = nullptr 
)
inline

◆ setSessionTimeoutMs()

template<typename Platform >
void setSessionTimeoutMs ( unsigned long  ms)
inline

Member Data Documentation

◆ client

template<typename Platform >
Platform::TcpClientType client
protectedinherited

◆ client_count

template<typename Platform >
int client_count = 0
protectedinherited

◆ lastRequestTime

template<typename Platform >
unsigned long lastRequestTime = 0
protectedinherited

◆ onSessionPathCb

template<typename Platform >
bool(* onSessionPathCb) (const char *, void *) = nullptr
protectedinherited

◆ onSessionPathRef

template<typename Platform >
void* onSessionPathRef = nullptr
protectedinherited

◆ port

template<typename Platform >
int port = 554
protectedinherited

◆ rtspSession

template<typename Platform >
RtspSession<Platform>* rtspSession = nullptr
protectedinherited

◆ server

template<typename Platform >
Platform::TcpServerType* server = nullptr
protectedinherited

◆ sessionTimeoutMs

template<typename Platform >
unsigned long sessionTimeoutMs = 60000
protectedinherited

◆ streamer

template<typename Platform >
RTSPAudioStreamerBase<Platform>* streamer = nullptr
protectedinherited

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