|
Discord.C++ 0.13.0
|
#include <VoiceGateway.h>
Public Member Functions | |
| VoiceGateway (const std::string &token, std::string session_id, std::string guild_id, std::string user_id, const std::shared_ptr< Threadpool > &threadpool) | |
| ~VoiceGateway () override=default | |
Public Member Functions inherited from DiscordCPP::Gateway | |
| Gateway (std::string token, const std::shared_ptr< Threadpool > &threadpool) | |
| virtual | ~Gateway () |
| void | set_message_handler (const std::function< void(json payload)> &handler) |
| virtual SharedFuture< void > | connect (const std::string &url) |
| SharedFuture< void > | send (const json &message) |
| SharedFuture< void > | close () |
Additional Inherited Members | |
Protected Member Functions inherited from DiscordCPP::Gateway | |
| void | start_heartbeating () |
| void | on_websocket_disconnnect () |
Protected Attributes inherited from DiscordCPP::Gateway | |
| std::shared_ptr< Threadpool > | threadpool |
| the threadpool used for tasks handling messages | |
| boost::asio::io_context | io_context |
| boost io context used by the websocket client | |
| boost::asio::ssl::context | ssl_context |
| ssl context used by the websocket client | |
| std::unique_ptr< boost::beast::websocket::stream< boost::beast::ssl_stream< boost::asio::ip::tcp::socket > > > | _client |
| websocket client | |
| std::string | _url |
| the url of the gateway | |
| std::string | _resume_url |
| the url used for reconnecting | |
| std::string | _token |
| token to identify with the gateway | |
| unsigned int | _heartbeat_interval |
| heartbeat interval in milliseconds | |
| bool | _keepalive |
| wether to keep the websocket alive or not | |
| unsigned int | _reconnect_timeout |
| sometimes it is better a few seconds before reconnecting... | |
| time_t | _last_heartbeat_ack = 0 |
| timestamp of last heartbeat ack | |
| std::thread | _heartbeat_task |
| heartbeat task | |
| bool | _connected |
| indicator if Gateway is connected | |
| Logger | _log |
| logging instance | |
| std::function< void(json payload)> | _message_handler |
| the message handler set by using set_message_handler | |
| DiscordCPP::VoiceGateway::VoiceGateway | ( | const std::string & | token, |
| std::string | session_id, | ||
| std::string | guild_id, | ||
| std::string | user_id, | ||
| const std::shared_ptr< Threadpool > & | threadpool ) |
|
overridedefault |