diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-11-15 02:14:49 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-11-15 02:15:21 -0500 |
commit | 929ebf1a6008d861473e3ceffd11cd4eca90d620 (patch) | |
tree | ae6c1bf426e0cbe258b9dfc79435f3e4e1256642 /src/discord/websocket.hpp | |
parent | 38c5230a1d194cb2fc4cf36fb6b417fdefb32788 (diff) | |
download | abaddon-portaudio-929ebf1a6008d861473e3ceffd11cd4eca90d620.tar.gz abaddon-portaudio-929ebf1a6008d861473e3ceffd11cd4eca90d620.zip |
mess with some websocket stuff to try and fix things
to be honest, im not sure what ive done here. whatever memory i have of the issue i was trying to fix has long disappeared by the time im committing this. theres still some issues with being force disconnected and i really dont understand it
ill figure it out eventually... maybe :/
Diffstat (limited to 'src/discord/websocket.hpp')
-rw-r--r-- | src/discord/websocket.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/discord/websocket.hpp b/src/discord/websocket.hpp index ba55254..768121e 100644 --- a/src/discord/websocket.hpp +++ b/src/discord/websocket.hpp @@ -6,10 +6,11 @@ #include <glibmm.h> #include <nlohmann/json.hpp> #include <sigc++/sigc++.h> +#include <spdlog/spdlog.h> class Websocket { public: - Websocket(); + Websocket(const std::string &id); void StartConnection(const std::string &url); void SetUserAgent(std::string agent); @@ -30,7 +31,7 @@ private: public: using type_signal_open = sigc::signal<void>; - using type_signal_close = sigc::signal<void, uint16_t>; + using type_signal_close = sigc::signal<void, ix::WebSocketCloseInfo>; using type_signal_message = sigc::signal<void, std::string>; type_signal_open signal_open(); @@ -46,5 +47,7 @@ private: Glib::Dispatcher m_open_dispatcher; Glib::Dispatcher m_close_dispatcher; - std::atomic<uint16_t> m_close_code; + ix::WebSocketCloseInfo m_close_info; + + std::shared_ptr<spdlog::logger> m_log; }; |