Add support for X-SS-Connect-Data in RTSP SETUP for control stream

This allows the host to provide a 32-bit integer that will be sent
in the data of the ENet connect event, similar to X-SS-Ping-Payload
for video and audio.

The host can use this data to uniquely identify a client when IP
addresses are not stable across the various separate connections,
such as when the client is behind a Carrier-Grade NAT.
This commit is contained in:
Cameron Gutman
2023-12-28 16:56:06 -06:00
parent 50d8dcb072
commit 6e9ed871bc
5 changed files with 15 additions and 2 deletions

View File

@@ -1625,7 +1625,7 @@ int startControlStream(void) {
enet_socket_set_option (client->socket, ENET_SOCKOPT_QOS, 1);
// Connect to the host
peer = enet_host_connect(client, &remoteAddress, CTRL_CHANNEL_COUNT, 0);
peer = enet_host_connect(client, &remoteAddress, CTRL_CHANNEL_COUNT, ControlConnectData);
if (peer == NULL) {
stopping = true;
enet_host_destroy(client);