|
static void | closeSocket (TcpClient *s) |
| Close a TCP socket connection.
|
|
static void | closeUdpSocket (UdpSocket *s) |
| Close a UDP socket.
|
|
static TcpServerType * | createServer (uint16_t port) |
| Create a TCP server listening on provided port.
|
|
static UdpSocket * | createUdpSocket (unsigned short portNum) |
| Create and bind a UDP socket.
|
|
static TcpClientType | getAvailableClient (TcpServerType *srv) |
| Get next available client from server.
|
|
static void | getSocketPeerAddr (TcpClient *s, IPAddress *addr, uint16_t *port) |
| Get remote peer address and port from TCP socket.
|
|
static int | readSocket (TcpClient *sock, char *buf, size_t buflen, int timeoutmsec) |
| Read from TCP socket with timeout.
|
|
static ssize_t | sendSocket (TcpClient *sockfd, const void *buf, size_t len) |
| Send data over TCP socket.
|
|
static ssize_t | sendUdpSocket (UdpSocket *sockfd, const void *buf, size_t len, IPAddress destaddr, uint16_t destport) |
| Send UDP packet to specified destination.
|
|
template<typename TcpServer, typename TcpClient, typename UdpSocket>
class audio_tools::RTSPPlatform< TcpServer, TcpClient, UdpSocket >
Template-based platform abstraction for RTSP networking.
This template class provides a unified interface for network operations across different platforms while maintaining type safety. The template parameters allow customization of the underlying network implementation.
- Template Parameters
-
TcpClient | TCP client implementation (e.g., WiFiClient, EthernetClient) |
UdpSocket | UDP socket implementation (e.g., WiFiUDP, EthernetUDP) |