mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Send PING every half second
This commit is contained in:
@@ -59,7 +59,7 @@ static void UdpPingThreadProc(void *context) {
|
|||||||
saddr.sin_port = htons(RTP_PORT);
|
saddr.sin_port = htons(RTP_PORT);
|
||||||
memcpy(&saddr.sin_addr, &remoteHost, sizeof(remoteHost));
|
memcpy(&saddr.sin_addr, &remoteHost, sizeof(remoteHost));
|
||||||
|
|
||||||
/* Send PING every 100 milliseconds */
|
/* Send PING every 500 milliseconds */
|
||||||
while (!PltIsThreadInterrupted(&udpPingThread)) {
|
while (!PltIsThreadInterrupted(&udpPingThread)) {
|
||||||
err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, sizeof(saddr));
|
err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, sizeof(saddr));
|
||||||
if (err != sizeof(pingData)) {
|
if (err != sizeof(pingData)) {
|
||||||
@@ -68,7 +68,7 @@ static void UdpPingThreadProc(void *context) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PltSleepMs(100);
|
PltSleepMs(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ static void UdpPingThreadProc(void *context) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PltSleepMs(100);
|
PltSleepMs(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user