Update ip discovery to send 74 bytes (#2617)

This commit is contained in:
Kuba_Z2
2023-03-02 20:19:10 +01:00
committed by GitHub
parent abfa8d1751
commit 66e6329b9d
2 changed files with 11 additions and 9 deletions

View File

@@ -228,12 +228,14 @@ namespace Discord.Audio
#region Udp
public async Task SendDiscoveryAsync(uint ssrc)
{
var packet = new byte[70];
packet[0] = (byte)(ssrc >> 24);
packet[1] = (byte)(ssrc >> 16);
packet[2] = (byte)(ssrc >> 8);
packet[3] = (byte)(ssrc >> 0);
await SendAsync(packet, 0, 70).ConfigureAwait(false);
var packet = new byte[74];
packet[1] = 1;
packet[3] = 70;
packet[4] = (byte)(ssrc >> 24);
packet[5] = (byte)(ssrc >> 16);
packet[6] = (byte)(ssrc >> 8);
packet[7] = (byte)(ssrc >> 0);
await SendAsync(packet, 0, 74).ConfigureAwait(false);
await _sentDiscoveryEvent.InvokeAsync().ConfigureAwait(false);
}
public async Task<ulong> SendKeepaliveAsync()