|
Orca
A bot framework that is easy to reason about, easy to debug, and easy to use.
|
Discord Voice Connection handle, contain information about its active session. More...
#include <discord-voice-connections.h>

Public Attributes | |
| u64_snowflake_t | guild_id |
| the session guild id More... | |
| u64_snowflake_t | channel_id |
| char | token [128] |
| the session token More... | |
| char | new_token [128] |
| the new session token after a voice region change More... | |
| char | new_url [512] |
| the new url after a voice region change More... | |
| char | session_id [128] |
| the session id More... | |
| u64_snowflake_t | bot_id |
| the bot user id More... | |
| struct websockets * | ws |
| struct { | |
| bool enable | |
| will attempt reconnecting if true | |
| unsigned char attempt | |
| current reconnect attempt (resets to 0 when succesful) | |
| unsigned char threshold | |
| max amount of reconnects before giving up | |
| } | reconnect |
| handle reconnect logic | |
| bool | is_resumable |
| will attempt to resume session if connection shutsdown | |
| bool | is_redirect |
| redirect to a different voice server | |
| bool | is_ready |
| can start sending/receiving additional events to discord | |
| struct { | |
| enum discord_voice_opcodes opcode | |
| struct sized_buffer event_data | |
| } | payload |
| struct { | |
| u64_unix_ms_t interval_ms | |
| u64_unix_ms_t tstamp | |
| } | hbeat |
| int | ping_ms |
| latency between client and websockets server, calculated by the interval between HEARTBEAT and HEARTBEAT_ACK | |
| struct discord * | p_client |
| pointer to client this struct is part of | |
| bool | shutdown |
| if true shutdown websockets connection as soon as possible | |
| struct { | |
| int ssrc | |
| int server_port | |
| char server_ip [CEE_MAX_IP_ADDR_STR_LEN] | |
| char digest [CEE_SHA1_STR_LEN] | |
| char unique_key [128] | |
| int audio_udp_pid | |
| uintmax_t start_time | |
| } | udp_service |
| struct discord_voice_cbs * | p_voice_cbs |
| uint64_t | message_channel_id |
| used to communicate the status of the bot state changes | |
| int | recv_interval |
| Interval to divide the received packets. More... | |
Discord Voice Connection handle, contain information about its active session.
| u64_snowflake_t discord_voice::bot_id |
the bot user id
| u64_snowflake_t discord_voice::channel_id |
the session channel id
| struct sized_buffer discord_voice::event_data |
field 'd'
| u64_snowflake_t discord_voice::guild_id |
the session guild id
| u64_unix_ms_t discord_voice::interval_ms |
fixed interval between heartbeats
| char discord_voice::new_token[128] |
the new session token after a voice region change
| char discord_voice::new_url[512] |
the new url after a voice region change
| enum discord_voice_opcodes discord_voice::opcode |
field 'op'
| struct { ... } discord_voice::payload |
| int discord_voice::recv_interval |
Interval to divide the received packets.
0 store in one file n store packets received every n minutes in a new file
| char discord_voice::session_id[128] |
the session id
| char discord_voice::token[128] |
the session token
| u64_unix_ms_t discord_voice::tstamp |
start pulse timestamp in milliseconds
| struct websockets* discord_voice::ws |
the websockets handle that binds to Discord Voice Connections
1.8.17