Use connected datagram sockets for audio and video

This ensures unwanted data from other sources is dropped and that our own source address doesn't change while streaming.
This commit is contained in:
Cameron Gutman
2023-09-12 23:29:05 -05:00
parent ec6713fd80
commit c13f4a323f
4 changed files with 38 additions and 17 deletions

View File

@@ -86,6 +86,7 @@ void addrToUrlSafeString(struct sockaddr_storage* addr, char* string);
SOCKET createSocket(int addressFamily, int socketType, int protocol, bool nonBlocking);
SOCKET connectTcpSocket(struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen, unsigned short port, int timeoutSec);
int connectUdpSocket(SOCKET s, struct sockaddr_storage* dstaddr, SOCKADDR_LEN addrlen, unsigned short port);
int sendMtuSafe(SOCKET s, char* buffer, int size);
SOCKET bindUdpSocket(int addrfamily, int bufferSize);
int enableNoDelay(SOCKET s);