mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-29 09:14:13 +00:00
Bind our UDP sockets to the same local address used by RTSP handshake
This means we can ensure a consistent local address for our outgoing PING traffic to keep the UDP flows alive without having to call connect() which breaks with multi-homed hosts on GFE and Sunshine v0.20 and earlier.
This commit is contained in:
1 parent
c86f49ee7f
commit
05c3f9c754
10 files changed
+66
-40
No files matched your search
+1
-1
@@ -73,7 +73,7 @@ int LiFindExternalAddressIP4(const char* stunServer, unsigned short stunPort, un
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
sock = bindUdpSocket(hints.ai_family, 0);
|
||||
sock = bindUdpSocket(hints.ai_family, NULL, 0, 0);
|
||||
if (sock == INVALID_SOCKET) {
|
||||
err = LastSocketFail();
|
||||
Limelog("Failed to connect to STUN server: %d\n", err);
|
||||
|
||||
Reference in new issue
Block a user