diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-11-28 02:16:59 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-11-28 02:16:59 -0500 |
commit | 1989b22993378f8bad9e5b6577b2c934814294cf (patch) | |
tree | 27bc1c1fa21833dcddce907c4e1b34d57b94f269 /discord/websocket.cpp | |
parent | 0b8c83eaa1fdb0fcb610f9181145abde3d60d803 (diff) | |
parent | 6f7ea234e559b8a43b40fa325f3425c2e8a8e6fd (diff) | |
download | abaddon-portaudio-1989b22993378f8bad9e5b6577b2c934814294cf.tar.gz abaddon-portaudio-1989b22993378f8bad9e5b6577b2c934814294cf.zip |
Merge branch 'master' into disk-cache
Diffstat (limited to 'discord/websocket.cpp')
-rw-r--r-- | discord/websocket.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/websocket.cpp b/discord/websocket.cpp index 2dc4ad0..5cd82b1 100644 --- a/discord/websocket.cpp +++ b/discord/websocket.cpp @@ -7,9 +7,14 @@ void Websocket::StartConnection(std::string url) { m_websocket.disableAutomaticReconnection(); m_websocket.setUrl(url); m_websocket.setOnMessageCallback(std::bind(&Websocket::OnMessage, this, std::placeholders::_1)); + m_websocket.setExtraHeaders(ix::WebSocketHttpHeaders { { "User-Agent", m_agent } }); // idk if this actually works m_websocket.start(); } +void Websocket::SetUserAgent(std::string agent) { + m_agent = agent; +} + void Websocket::Stop() { m_websocket.stop(); } |