diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-29 22:47:00 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-09-29 22:47:00 -0400 |
commit | b735feb901387d26984ceba66bb0c555b16c1838 (patch) | |
tree | 705aa0ca9263a7f252ff94543e454a6f05431e57 /src/discord/voiceclient.hpp | |
parent | dc127d15fb49c108450e691c44ed930a11bb7e59 (diff) | |
download | abaddon-portaudio-b735feb901387d26984ceba66bb0c555b16c1838.tar.gz abaddon-portaudio-b735feb901387d26984ceba66bb0c555b16c1838.zip |
add udp keepalive
Diffstat (limited to 'src/discord/voiceclient.hpp')
-rw-r--r-- | src/discord/voiceclient.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/discord/voiceclient.hpp b/src/discord/voiceclient.hpp index 1dc6e1a..634c333 100644 --- a/src/discord/voiceclient.hpp +++ b/src/discord/voiceclient.hpp @@ -5,8 +5,8 @@ #include "snowflake.hpp" #include "waiter.hpp" #include "websocket.hpp" -#include <optional> #include <mutex> +#include <optional> #include <queue> #include <string> #include <glibmm/dispatcher.h> @@ -211,6 +211,7 @@ private: void OnUDPData(std::vector<uint8_t> data); void HeartbeatThread(); + void KeepaliveThread(); std::string m_session_id; std::string m_endpoint; @@ -242,6 +243,9 @@ private: Waiter m_heartbeat_waiter; std::thread m_heartbeat_thread; + Waiter m_keepalive_waiter; + std::thread m_keepalive_thread; + std::array<uint8_t, 1275> m_opus_buffer; std::atomic<bool> m_connected = false; |