dpp::discord_voice_client
dpp::websocket_client
discordvoiceclient.h
dpp::discord_voice_client::courier_shared_state_t
dpp::discord_voice_client::voice_payload
dpp::discord_voice_client::voice_payload_parking_lot
send_audio_type_t
dpp::discord_voice_client::send_audio_type_t
satype_recorded_audio
satype_live_audio
satype_overlap_audio

The audio type to be sent.

On Windows, the default type is overlap audio. On all other platforms, it is recorded audio.

If the audio is recorded, the sending of audio packets is throttled. Otherwise, if the audio is live, the sending is not throttled.

Discord voice engine is expecting audio data as if they were from some audio device, e.g. microphone, where the data become available as they get captured from the audio device.

In case of recorded audio, unlike from a device, the audio data are usually instantly available in large chunks. Throttling is needed to simulate audio data coming from an audio device. In case of live audio, the throttling is by nature, so no extra throttling is needed.

Using live audio mode for recorded audio can cause Discord to skip audio data because Discord does not expect to receive, say, 3 minutes' worth of audio data in 1 second.

There are some inaccuracies in the throttling method used by the recorded audio mode on some systems (mainly Windows) which causes gaps and stutters in the resulting audio stream. The overlap audio mode provides a different implementation that fixes the issue. This method is slightly more CPU intensive, and should only be used if you encounter issues with recorded audio on your system.

Use discord_voice_client::set_send_audio_type to change this value as it ensures thread safety.

uint16_t using dpp::discord_voice_client::rtp_seq_t = uint16_t rtp_seq_t dpp::discord_voice_client::rtp_seq_t

Data type of RTP packet sequence number field.

uint32_t using dpp::discord_voice_client::rtp_timestamp_t = uint32_t rtp_timestamp_t dpp::discord_voice_client::rtp_timestamp_t
uint8_t uint8_t dpp::discord_voice_client::silence_packet[3] [3] silence_packet dpp::discord_voice_client::silence_packet = { 0xf8, 0xff, 0xfe }

A frame of silence packet.

time_t time_t dpp::discord_voice_client::connect_time connect_time dpp::discord_voice_client::connect_time {}

Last connect time of voice session.

std::set< dpp::snowflake > std::set<dpp::snowflake> dpp::discord_voice_client::dave_mls_pending_remove_list dave_mls_pending_remove_list dpp::discord_voice_client::dave_mls_pending_remove_list

The list of users that have left the voice channel but not yet removed from MLS group.

std::set< dpp::snowflake > std::set<dpp::snowflake> dpp::discord_voice_client::dave_mls_user_list dave_mls_user_list dpp::discord_voice_client::dave_mls_user_list

The list of users that have E2EE potentially enabled for DAVE protocol.

dave_version_t dave_version_t dpp::discord_voice_client::dave_version dave_version dpp::discord_voice_client::dave_version

DAVE - Discord Audio Visual Encryption Used for E2EE encryption. dave_protocol_none is the default right now.

address_t address_t dpp::discord_voice_client::destination destination dpp::discord_voice_client::destination {}

Destination address for where packets go on the UDP socket.

uint8_t uint8_t dpp::discord_voice_client::encode_buffer[65536] [65536] encode_buffer dpp::discord_voice_client::encode_buffer {}

Encoding buffer for opus repacketizer and encode.

void * void* dpp::discord_voice_client::encoder encoder dpp::discord_voice_client::encoder

libopus encoder

std::string std::string dpp::discord_voice_client::external_ip external_ip dpp::discord_voice_client::external_ip

Our public IP address.

Use discord_voice_client::discover_ip() to access this value

dpp::socket dpp::socket dpp::discord_voice_client::fd fd dpp::discord_voice_client::fd {}

File descriptor for UDP connection.

bool bool dpp::discord_voice_client::has_secret_key has_secret_key dpp::discord_voice_client::has_secret_key {false}

True if the voice client has a secret key.

std::string std::string dpp::discord_voice_client::ip ip dpp::discord_voice_client::ip

IP of UDP/RTP endpoint.

time_t time_t dpp::discord_voice_client::last_loop_time last_loop_time dpp::discord_voice_client::last_loop_time {0}

Last time we reconnected.

std::chrono::nanoseconds std::chrono::nanoseconds dpp::discord_voice_client::last_sleep_remainder last_sleep_remainder dpp::discord_voice_client::last_sleep_remainder {}

Fraction of the sleep that was not executed after the last audio packet was sent.

std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::time_point dpp::discord_voice_client::last_timestamp last_timestamp dpp::discord_voice_client::last_timestamp

Last sent packet high-resolution timestamp.

std::deque< std::string > std::deque<std::string> dpp::discord_voice_client::message_queue message_queue dpp::discord_voice_client::message_queue

Queue of outbound messages.

std::unique_ptr< audio_mixer > std::unique_ptr<audio_mixer> dpp::discord_voice_client::mixer mixer dpp::discord_voice_client::mixer
std::unique_ptr< int > std::unique_ptr<int> dpp::discord_voice_client::mls_state mls_state dpp::discord_voice_client::mls_state {}

This holds the state information for DAVE E2EE. it is only allocated if E2EE is active on the voice channel.

std::vector< std::string > std::vector<std::string> dpp::discord_voice_client::modes modes dpp::discord_voice_client::modes

List of supported audio encoding modes.

std::vector< voice_out_packet > std::vector<voice_out_packet> dpp::discord_voice_client::outbuf outbuf dpp::discord_voice_client::outbuf

Output buffer.

uint32_t uint32_t dpp::discord_voice_client::packet_nonce packet_nonce dpp::discord_voice_client::packet_nonce {}

Each packet should have a nonce, a 32-bit incremental integer value appended to payload.

We should keep track of this value and increment it for each packet sent.

Current initial value is hardcoded to 1.

bool bool dpp::discord_voice_client::paused paused dpp::discord_voice_client::paused {}

If true, audio packet sending is paused.

uint16_t uint16_t dpp::discord_voice_client::port port dpp::discord_voice_client::port {}

Port number of UDP/RTP endpoint.

std::shared_mutex std::shared_mutex dpp::discord_voice_client::queue_mutex queue_mutex dpp::discord_voice_client::queue_mutex

Mutex for message queue.

int32_t int32_t dpp::discord_voice_client::receive_sequence receive_sequence dpp::discord_voice_client::receive_sequence {}

Last received sequence from gateway.

Needed for heartbeat and resume payload.

void * void* dpp::discord_voice_client::repacketizer repacketizer dpp::discord_voice_client::repacketizer

libopus repacketizer (merges frames into one packet)

std::array< uint8_t, secret_key_size > std::array<uint8_t, secret_key_size> dpp::discord_voice_client::secret_key secret_key dpp::discord_voice_client::secret_key {}

Secret key for encrypting voice. If it has been sent, this contains a sequence of exactly 32 bytes (secret_key_size) and has_secret_key is set to true.

bool bool dpp::discord_voice_client::sending sending dpp::discord_voice_client::sending {}

This is set to true if we have started sending audio. When this moves from false to true, this causes the client to send the 'talking' notification to the websocket.

bool bool dpp::discord_voice_client::sent_stop_frames sent_stop_frames dpp::discord_voice_client::sent_stop_frames {}

Whether has sent 5 frame of silence before stopping on pause.

This is to avoid unintended Opus interpolation with subsequent transmissions.

uint16_t uint16_t dpp::discord_voice_client::sequence sequence dpp::discord_voice_client::sequence {}

Sequence number of outbound audio. This is incremented once per frame sent.

uint64_t uint64_t dpp::discord_voice_client::ssrc ssrc dpp::discord_voice_client::ssrc {}

SSRC value.

std::unordered_map< uint32_t, snowflake > std::unordered_map<uint32_t, snowflake> dpp::discord_voice_client::ssrc_map ssrc_map dpp::discord_voice_client::ssrc_map

Maps receiving ssrc to user id.

std::mutex std::mutex dpp::discord_voice_client::stream_mutex stream_mutex dpp::discord_voice_client::stream_mutex

Mutex for outbound packet stream.

size_t size_t dpp::discord_voice_client::times_looped times_looped dpp::discord_voice_client::times_looped {0}

Number of times we have tried to reconnect in the last few seconds.

uint64_t uint64_t dpp::discord_voice_client::timescale timescale dpp::discord_voice_client::timescale {}

Timescale in nanoseconds.

uint32_t uint32_t dpp::discord_voice_client::timestamp timestamp dpp::discord_voice_client::timestamp {}

Timestamp value used in outbound audio. Each packet has the timestamp value which is incremented to match how many frames are sent.

std::vector< std::string > std::vector<std::string> dpp::discord_voice_client::track_meta track_meta dpp::discord_voice_client::track_meta

Meta data associated with each track. Arbitrary string that the user can set via dpp::discord_voice_client::add_marker.

uint32_t uint32_t dpp::discord_voice_client::tracks tracks dpp::discord_voice_client::tracks {}

Number of track markers in the buffer. For example if there are two track markers in the buffer there are 3 tracks.

Special case:

If the buffer is empty, there are zero tracks in the buffer.

dpp::socket_events dpp::socket_events dpp::discord_voice_client::udp_events udp_events dpp::discord_voice_client::udp_events

Events for UDP Socket IO.

std::thread std::thread dpp::discord_voice_client::voice_courier voice_courier dpp::discord_voice_client::voice_courier

Thread used to deliver incoming voice data to handlers.

struct dpp::discord_voice_client::courier_shared_state_t struct dpp::discord_voice_client::courier_shared_state_t dpp::discord_voice_client::voice_courier_shared_state voice_courier_shared_state dpp::discord_voice_client::voice_courier_shared_state
snowflake snowflake dpp::discord_voice_client::channel_id channel_id dpp::discord_voice_client::channel_id

Channel ID.

class dpp::cluster * class dpp::cluster* dpp::discord_voice_client::creator creator dpp::discord_voice_client::creator {}

Owning cluster.

float float dpp::discord_voice_client::current_gain current_gain dpp::discord_voice_client::current_gain {}

The gain value for the current voice iteration.

float float dpp::discord_voice_client::end_gain end_gain dpp::discord_voice_client::end_gain {}

The gain value for the end of the current voice iteration.

uint32_t uint32_t dpp::discord_voice_client::heartbeat_interval heartbeat_interval dpp::discord_voice_client::heartbeat_interval {}

Heartbeat interval for sending heartbeat keepalive.

float float dpp::discord_voice_client::increment increment dpp::discord_voice_client::increment {}

The amount to increment each successive sample for, for the current voice iteration.

uint16_t uint16_t dpp::discord_voice_client::iteration_interval iteration_interval dpp::discord_voice_client::iteration_interval {500}

The time (in milliseconds) between each interval when parsing audio.

You should only change this if you know what you're doing. It is set to 500ms by default.

bool bool dpp::ssl_connection::keepalive keepalive dpp::ssl_connection::keepalive

True if we are keeping the connection alive after it has finished.

time_t time_t dpp::discord_voice_client::last_heartbeat last_heartbeat dpp::discord_voice_client::last_heartbeat {}

Last voice channel websocket heartbeat.

moving_averager moving_averager dpp::discord_voice_client::moving_average moving_average dpp::discord_voice_client::moving_average

Moving averager.

class cluster * class cluster* dpp::ssl_connection::owner owner dpp::ssl_connection::owner

Owning cluster.

std::string std::string dpp::ssl_connection::private_key_file private_key_file dpp::ssl_connection::private_key_file

Private key PEM file path for inbound SSL connections.

std::string std::string dpp::ssl_connection::public_key_file public_key_file dpp::ssl_connection::public_key_file

Public key PEM file path for inbound SSL connections.

full_reconnection_callback_t full_reconnection_callback_t dpp::discord_voice_client::reconnection_callback reconnection_callback dpp::discord_voice_client::reconnection_callback
enum dpp::discord_voice_client::send_audio_type_t enum dpp::discord_voice_client::send_audio_type_t dpp::discord_voice_client::send_audio_type send_audio_type dpp::discord_voice_client::send_audio_type = satype_recorded_audio
snowflake snowflake dpp::discord_voice_client::server_id server_id dpp::discord_voice_client::server_id

Server ID.

std::string std::string dpp::discord_voice_client::sessionid sessionid dpp::discord_voice_client::sessionid

Discord voice session id.

bool bool dpp::discord_voice_client::terminating terminating dpp::discord_voice_client::terminating {}

True when the thread is shutting down.

std::string std::string dpp::discord_voice_client::token token dpp::discord_voice_client::token

Discord voice session token.

void void dpp::discord_voice_client::cleanup () cleanup dpp::discord_voice_client::cleanup

Clean up resources.

void void dpp::discord_voice_client::clear_queue () clear_queue dpp::discord_voice_client::clear_queue

Clear the outbound message queue.

size_t size_t dpp::discord_voice_client::encode (uint8_t *input, size_t inDataSize, uint8_t *output, size_t &outDataSize) encode dpp::discord_voice_client::encode uint8_t * input size_t inDataSize uint8_t * output size_t & outDataSize

Encode a byte buffer using opus codec. Multiple opus frames (2880 bytes each) will be encoded into one packet for sending.

input

Input data as raw bytes of PCM data

inDataSize

Input data length

output

Output data as an opus encoded packet

outDataSize

Output data length, should be at least equal to the input size. Will be adjusted on return to the actual compressed data size.

size_t The compressed data size that was encoded.

dpp::voice_exception

If data length to encode is invalid or voice support not compiled into D++

size_t size_t dpp::discord_voice_client::get_queue_size () get_queue_size dpp::discord_voice_client::get_queue_size

Get the size of the outbound message queue.

The size of the queue

void void dpp::discord_voice_client::queue_message (const std::string &j, bool to_front=false) queue_message dpp::discord_voice_client::queue_message const std::string & j bool to_front false

Queue a message to be sent via the websocket.

j

The JSON data of the message to be sent

to_front

If set to true, will place the message at the front of the queue not the back (this is for urgent messages such as heartbeat, presence, so they can take precedence over chunk requests etc)

void void dpp::discord_voice_client::read_ready () read_ready dpp::discord_voice_client::read_ready

Called by socketengine when there is data to be read. At this point we insert that data into the input queue.

dpp::voice_exception

if voice support is not compiled into D++

void void dpp::discord_voice_client::send (const char *packet, size_t len, uint64_t duration, bool send_now=false) send dpp::discord_voice_client::send const char * packet size_t len uint64_t duration bool send_now false

Send data to the UDP socket, using the buffer.

packet

packet data

len

length of packet

duration

duration of opus packet

send_now

send this packet right away without buffering. Do NOT set send_now to true outside write_ready.

void void dpp::discord_voice_client::setup () setup dpp::discord_voice_client::setup

Called in constructor and on reconnection of websocket.

int int dpp::discord_voice_client::udp_recv (char *data, size_t max_length) udp_recv dpp::discord_voice_client::udp_recv char * data size_t max_length

Receive data from UDP socket immediately.

data

data to receive

max_length

size of data receiving buffer

int bytes received. -1 if there is an error (e.g. EAGAIN)

int int dpp::discord_voice_client::udp_send (const char *data, size_t length) udp_send dpp::discord_voice_client::udp_send const char * data size_t length

Send data to UDP socket immediately.

data

data to send

length

length of data to send

int bytes sent. Will return -1 if we cannot send

void void dpp::discord_voice_client::update_ratchets (bool force=false) update_ratchets dpp::discord_voice_client::update_ratchets bool force false

Updates DAVE MLS ratchets for users in the VC force

True to force updating of ratchets regardless of state

void void dpp::discord_voice_client::write_ready () write_ready dpp::discord_voice_client::write_ready

Called by socketengine when the socket is ready for writing, at this point we pick the head item off the buffer and send it. So long as it doesn't error completely, we pop it off the head of the queue.

void static void dpp::discord_voice_client::voice_courier_loop (discord_voice_client &, courier_shared_state_t &) voice_courier_loop dpp::discord_voice_client::voice_courier_loop discord_voice_client & courier_shared_state_t &

The run loop of the voice courier thread.

dpp::discord_voice_client::discord_voice_client
(dpp::cluster *_cluster, full_reconnection_callback_t _reconnection_callback, snowflake _channel_id, snowflake _server_id, const std::string &_token, const std::string &_session_id, const std::string &_host, bool enable_dave=true)
discord_voice_client
dpp::discord_voice_client::discord_voice_client
dpp::cluster * _cluster
full_reconnection_callback_t _reconnection_callback
snowflake _channel_id
snowflake _server_id
const std::string & _token
const std::string & _session_id
const std::string & _host
bool enable_dave true

Constructor takes shard id, max shards and token. _cluster

The cluster which owns this voice connection, for related logging, REST requests etc

_reconnection_callback

The callback this voice client calls if the voice connection was closed due to error

_channel_id

The channel id to identify the voice connection as

_server_id

The server id (guild id) to identify the voice connection as

_token

The voice session token to use for identifying to the websocket

_session_id

The voice session id to identify with

_host

The voice server hostname to connect to (hostname:port format)

enable_dave

Enable DAVE E2EE

dpp::voice_exception

Opus failed to initialise, or D++ is not compiled with voice support

virtual dpp::discord_voice_client::~discord_voice_client
() override
~discord_voice_client
dpp::discord_voice_client::~discord_voice_client

Destroy the discord voice client object.

void virtual void dpp::websocket_client::close () override close dpp::websocket_client::close close

Close websocket.

void void dpp::ssl_connection::complete_handshake (const struct socket_events *ev) complete_handshake dpp::ssl_connection::complete_handshake const struct socket_events * ev

Called while SSL handshake is in progress. If the handshake completes, the state of the socket is progressed to an established state.

ev

Socket events for the socket

std::string std::string dpp::discord_voice_client::discover_ip () discover_ip dpp::discord_voice_client::discover_ip

Discord external IP detection.

std::string Your external IP address

This is a blocking operation that waits for a single packet from Discord's voice servers.

void void dpp::ssl_connection::enable_raw_tracing () enable_raw_tracing dpp::ssl_connection::enable_raw_tracing

For low-level debugging, calling this function will enable low level I/O logging for this connection to the logger. This can be very loud, and output a lot of data, so only enable it selectively where you need it.

Generally, you won't need this, it is a library development utility.

void virtual void dpp::discord_voice_client::error (uint32_t errorcode) override error dpp::discord_voice_client::error error uint32_t errorcode

Handle a websocket error.

errorcode

The error returned from the websocket

bool bool dpp::discord_voice_client::execute_pending_upgrade_downgrade () execute_pending_upgrade_downgrade dpp::discord_voice_client::execute_pending_upgrade_downgrade

Execute pending protocol upgrade/downgrade to/from dave.

true if did an upgrade/downgrade

uint64_t uint64_t dpp::ssl_connection::get_bytes_in () get_bytes_in dpp::ssl_connection::get_bytes_in

Get total bytes received.

uint64_t bytes received

uint64_t uint64_t dpp::ssl_connection::get_bytes_out () get_bytes_out dpp::ssl_connection::get_bytes_out

Get total bytes sent.

uint64_t bytes sent

std::string std::string dpp::ssl_connection::get_cipher () get_cipher dpp::ssl_connection::get_cipher

Get SSL cipher name.

std::string ssl cipher name

uint16_t uint16_t dpp::discord_voice_client::get_iteration_interval () get_iteration_interval dpp::discord_voice_client::get_iteration_interval

Get the iteration interval time (in milliseconds).

iteration_interval

const std::vector< std::string > const std::vector< std::string > dpp::discord_voice_client::get_marker_metadata () get_marker_metadata dpp::discord_voice_client::get_marker_metadata

Get the metadata string associated with each inserted marker.

const std::vector<std::string>& list of metadata strings

std::string std::string dpp::discord_voice_client::get_privacy_code () const get_privacy_code dpp::discord_voice_client::get_privacy_code

Returns the privacy code for the end to end encryption scheme ("DAVE"). if end-to-end encryption is not active, or is not yet established, this will return an empty string.

A sequence of six five-digit integers which can be matched against the Discord client, in the privacy tab for the properties of the voice call.

dpp::utility::uptime dpp::utility::uptime dpp::discord_voice_client::get_remaining () get_remaining dpp::discord_voice_client::get_remaining

Get the time remaining to send the audio output buffer in hours:minutes:seconds.

dpp::utility::uptime length of buffer

float float dpp::discord_voice_client::get_secs_remaining () get_secs_remaining dpp::discord_voice_client::get_secs_remaining

Get the number of seconds remaining of the audio output buffer.

float number of seconds remaining

uint64_t uint64_t dpp::discord_voice_client::get_timescale () get_timescale dpp::discord_voice_client::get_timescale

Get the current timescale, this will default to 1000000 which means 1 millisecond.

uint64_t timescale in nanoseconds

uint32_t uint32_t dpp::discord_voice_client::get_tracks_remaining () get_tracks_remaining dpp::discord_voice_client::get_tracks_remaining

Get the number of tracks remaining in the output buffer. This is calculated by the number of track markers plus one.

uint32_t Number of tracks in the buffer

uint64_t uint64_t dpp::ssl_connection::get_unique_id () const get_unique_id dpp::ssl_connection::get_unique_id

Every request made has a unique ID. This increments for every request, starting at 1. You can use this for statistics, or to associate requests and replies in external event loops.

Unique ID

dpp::utility::uptime dpp::utility::uptime dpp::discord_voice_client::get_uptime () get_uptime dpp::discord_voice_client::get_uptime

Returns the connection time of the voice client.

dpp::utility::uptime Detail of how long the voice client has been connected for

void void dpp::discord_voice_client::get_user_privacy_code (const dpp::snowflake user, privacy_code_callback_t callback) const get_user_privacy_code dpp::discord_voice_client::get_user_privacy_code const dpp::snowflake user privacy_code_callback_t callback

Returns the privacy code for a given user by id, if they are in the voice call, and enc-to-end encryption is enabled.

user

User ID to fetch the privacy code for

callback

Callback to call with the privacy code when the creation of the code is complete.

This call spawns a thread, as getting a user's privacy code is a CPU-intensive and memory-intensive operation which internally uses scrypt.

bool virtual bool dpp::websocket_client::handle_buffer (std::string &buffer) override handle_buffer dpp::websocket_client::handle_buffer handle_buffer std::string & buffer

Processes incoming frames from the SSL socket input buffer.

buffer

The buffer contents. Can modify this value removing the head elements when processed.

bool virtual bool dpp::discord_voice_client::handle_frame (const std::string &buffer, ws_opcode opcode) override handle_frame dpp::discord_voice_client::handle_frame handle_frame const std::string & buffer ws_opcode opcode

Handle JSON from the websocket.

buffer

The entire buffer content from the websocket client

opcode

Frame type, e.g. OP_TEXT, OP_BINARY

bool True if a frame has been handled

dpp::exception

If there was an error processing the frame, or connection to UDP socket failed

discord_voice_client & discord_voice_client & dpp::discord_voice_client::insert_marker (const std::string &metadata="") insert_marker dpp::discord_voice_client::insert_marker const std::string & metadata ""

Insert a track marker into the audio output buffer. A track marker is an arbitrary flag in the buffer contents that indicates the end of some block of audio of significance to the sender. This may be a song from a streaming site, or some voice audio/speech, a sound effect, or whatever you choose. You can later skip to the next marker using the dpp::discord_voice_client::skip_to_next_marker function.

metadata

Arbitrary information related to this track

reference to self

bool bool dpp::discord_voice_client::is_connected () is_connected dpp::discord_voice_client::is_connected

Returns true if the voice client is connected to the websocket.

True if connected

bool bool dpp::discord_voice_client::is_end_to_end_encrypted () const is_end_to_end_encrypted dpp::discord_voice_client::is_end_to_end_encrypted

Returns true if end-to-end encryption is enabled for the active voice call (Discord Audio Visual Encryption, a.k.a. DAVE).

True if end-to-end encrypted

bool bool dpp::discord_voice_client::is_paused () is_paused dpp::discord_voice_client::is_paused

Returns true if the audio is paused. You can unpause with dpp::discord_voice_client::pause_audio.

true if paused

bool bool dpp::discord_voice_client::is_playing () is_playing dpp::discord_voice_client::is_playing

Returns true if we are playing audio.

true if audio is playing

bool bool dpp::discord_voice_client::is_ready () is_ready dpp::discord_voice_client::is_ready

voice client is ready to stream audio. The voice client is considered ready if it has a secret key.

true if ready to stream audio

void virtual void dpp::discord_voice_client::log (dpp::loglevel severity, const std::string &msg) const override log dpp::discord_voice_client::log log dpp::loglevel severity const std::string & msg

Log a message to whatever log the user is using. The logged message is passed up the chain to the on_log event in user code which can then do whatever it wants to do with it.

severity

The log level from dpp::loglevel

msg

The log message to output

void void dpp::discord_voice_client::on_disconnect () override on_disconnect dpp::discord_voice_client::on_disconnect on_disconnect

Called on websocket disconnection.

void void dpp::ssl_connection::on_error (dpp::socket fd, const struct dpp::socket_events &, int error_code) on_error dpp::ssl_connection::on_error dpp::socket fd const struct dpp::socket_events & int error_code

Called when there is an error on the TCP socket.

fd

File descriptor

error_code

Error code

void void dpp::ssl_connection::on_read (dpp::socket fd, const struct dpp::socket_events &ev) on_read dpp::ssl_connection::on_read dpp::socket fd const struct dpp::socket_events & ev

Called when the TCP socket has data to read.

fd

File descriptor

ev

Socket events

void void dpp::ssl_connection::on_write (dpp::socket fd, const struct dpp::socket_events &e) on_write dpp::ssl_connection::on_write dpp::socket fd const struct dpp::socket_events & e

Called when the TCP socket can be written to without blocking.

fd

File descriptor

e

Socket events

void virtual void dpp::discord_voice_client::one_second_timer () override one_second_timer dpp::discord_voice_client::one_second_timer one_second_timer

Fires every second from the underlying socket I/O loop, used for sending heartbeats.

dpp::exception

if the socket needs to disconnect

discord_voice_client & discord_voice_client & dpp::discord_voice_client::pause_audio (bool pause) pause_audio dpp::discord_voice_client::pause_audio bool pause

Pause sending of audio.

pause

True to pause, false to resume

reference to self

void void dpp::discord_voice_client::process_mls_group_rosters (const std::map< uint64_t, std::vector< uint8_t > > &rmap) process_mls_group_rosters dpp::discord_voice_client::process_mls_group_rosters const std::map< uint64_t, std::vector< uint8_t > > & rmap

Process roster map from commit/welcome.

rmap

Roster map

void void dpp::ssl_connection::read_loop () read_loop dpp::ssl_connection::read_loop

Set up non blocking I/O and configure on_read, on_write and on_error.

std::exception

Any std::exception (or derivative) thrown from read_loop() indicates setup failed

void void dpp::discord_voice_client::ready_for_transition (const std::string &data) ready_for_transition dpp::discord_voice_client::ready_for_transition const std::string & data

Notify gateway ready for a DAVE transition.

Fires Voice Ready event when appropriate.

https://daveprotocol.com/#commit-handling

data

Websocket frame data

void void dpp::discord_voice_client::recover_from_invalid_commit_welcome () recover_from_invalid_commit_welcome dpp::discord_voice_client::recover_from_invalid_commit_welcome

Reset dave session, send voice_client_dave_mls_invalid_commit_welcome payload with current transition Id and our new key package to gateway.

https://daveprotocol.com/#recovery-from-invalid-commit-or-welcome

void void dpp::discord_voice_client::reinit_dave_mls_group () reinit_dave_mls_group dpp::discord_voice_client::reinit_dave_mls_group

Reset dave session and prepare initial session group.

void void dpp::discord_voice_client::run () run dpp::discord_voice_client::run

Start and monitor websocket I/O.

discord_voice_client & discord_voice_client & dpp::discord_voice_client::send_audio_opus (const uint8_t *opus_packet, const size_t length) send_audio_opus dpp::discord_voice_client::send_audio_opus const uint8_t * opus_packet const size_t length

Send opus packets to the voice channel.

Some containers such as .ogg may contain OPUS encoded data already. In this case, we don't need to encode the frames using opus here. We can bypass the codec, only applying opens to the stream.

Duration is calculated internally

opus_packet

Opus packets. Discord expects opus frames to be encoded at 48000Hz

length

The length of the audio data.

discord_voice_client& Reference to self

It is your responsibility to ensure that packets of data sent to send_audio are correctly repacketized for streaming, e.g. that audio frames are not too large or contain an incorrect format. Discord will still expect the same frequency and bit width of audio and the same signedness.

dpp::voice_exception

If data length is invalid or voice support not compiled into D++

discord_voice_client & discord_voice_client & dpp::discord_voice_client::send_audio_opus (const uint8_t *opus_packet, const size_t length, uint64_t duration, bool send_now=false) send_audio_opus dpp::discord_voice_client::send_audio_opus const uint8_t * opus_packet const size_t length uint64_t duration bool send_now false

Send opus packets to the voice channel.

Some containers such as .ogg may contain OPUS encoded data already. In this case, we don't need to encode the frames using opus here. We can bypass the codec, only applying openssl to the stream.

opus_packet

Opus packets. Discord expects opus frames to be encoded at 48000Hz

length

The length of the audio data.

duration

Generally duration is 2.5, 5, 10, 20, 40 or 60 if the timescale is 1000000 (1ms)

send_now

Send this packet right away without buffering, this will skip duration calculation for the packet being sent and only safe to be set to true in write_ready.

discord_voice_client& Reference to self

It is your responsibility to ensure that packets of data sent to send_audio are correctly repacketized for streaming, e.g. that audio frames are not too large or contain an incorrect format. Discord will still expect the same frequency and bit width of audio and the same signedness.

dpp::voice_exception

If data length is invalid or voice support not compiled into D++

discord_voice_client & discord_voice_client & dpp::discord_voice_client::send_audio_raw (uint16_t *audio_data, const size_t length) send_audio_raw dpp::discord_voice_client::send_audio_raw uint16_t * audio_data const size_t length

Send raw audio to the voice channel.

You should send an audio packet of `send_audio_raw_max_length` (11520) bytes. Note that this function can be costly as it has to opus encode the PCM audio on the fly, and also encrypt it with openssl.

Because this function encrypts and encodes packets before pushing them onto the output queue, if you have a complete stream ready to send and know its length it is advisable to call this method multiple times to enqueue the entire stream audio so that it is all encoded at once (unless you have set use_opus to false). Constantly calling this from dpp::cluster::on_voice_buffer_send can, and will, eat a TON of cpu!

audio_data

Raw PCM audio data. Channels are interleaved, with each channel's amplitude being a 16 bit value.

The audio data needs to be 48000Hz signed 16 bit audio, otherwise, the audio will come through incorrectly!

length

The length of the audio data. The length should be a multiple of 4 (2x 16 bit stereo channels) with a maximum length of `send_audio_raw_max_length`, which is a complete opus frame at highest quality.

Generally when you're streaming and you know there will be more packet to come you should always provide packet data with length of `send_audio_raw_max_length`. Silence packet will be appended if length is less than `send_audio_raw_max_length` as discord expects to receive such specific packet size. This can cause gaps in your stream resulting in distorted audio if you have more packet to send later on.

discord_voice_client& Reference to self

dpp::voice_exception

If data length is invalid or voice support not compiled into D++

void void dpp::websocket_client::send_close_packet () send_close_packet dpp::websocket_client::send_close_packet

Send OP_CLOSE error code 1000 to the other side of the connection. This indicates graceful close.

This informs Discord to invalidate the session, you cannot resume if you send this

discord_voice_client & discord_voice_client & dpp::discord_voice_client::send_silence (const uint64_t duration) send_silence dpp::discord_voice_client::send_silence const uint64_t duration

Send silence to the voice channel.

duration

How long to send silence for. With the standard timescale this is in milliseconds. Allowed values are 2.5, 5, 10, 20, 40 or 60 milliseconds.

discord_voice_client& Reference to self

dpp::voice_exception

if voice support is not compiled into D++

discord_voice_client & discord_voice_client & dpp::discord_voice_client::send_stop_frames (bool send_now=false) send_stop_frames dpp::discord_voice_client::send_stop_frames bool send_now false

Send stop frames to the voice channel.

send_now

send this packet right away without buffering. Do NOT set send_now to true outside write_ready. Also make sure you're not locking stream_mutex if you don't set send_now to true.

discord_voice_client& Reference to self

dpp::voice_exception

if voice support is not compiled into D++

discord_voice_client & discord_voice_client & dpp::discord_voice_client::set_iteration_interval (uint16_t interval) set_iteration_interval dpp::discord_voice_client::set_iteration_interval uint16_t interval

Change the iteration interval time.

interval

The time (in milliseconds) between each interval when parsing audio.

Reference to self.

discord_voice_client & discord_voice_client & dpp::discord_voice_client::set_send_audio_type (send_audio_type_t type) set_send_audio_type dpp::discord_voice_client::set_send_audio_type send_audio_type_t type

Sets the audio type that will be sent with send_audio_* methods.

send_audio_type_t

discord_voice_client & discord_voice_client & dpp::discord_voice_client::set_timescale (uint64_t new_timescale) set_timescale dpp::discord_voice_client::set_timescale uint64_t new_timescale

Set the timescale in nanoseconds.

new_timescale

Timescale to set. This defaults to 1000000, which means 1 millisecond.

discord_voice_client& Reference to self

dpp::voice_exception

If data length is invalid or voice support not compiled into D++

void void dpp::discord_voice_client::set_user_gain (snowflake user_id, float factor) set_user_gain dpp::discord_voice_client::set_user_gain snowflake user_id float factor

Sets the gain for the specified user.

Similar to the User Volume slider, controls the listening volume per user. Uses native Opus gain control, so clients don't have to perform extra audio processing.

The gain setting will affect the both individual and combined voice audio.

The gain value can also be set even before the user connects to the voice channel.

user_id

The ID of the user where the gain is to be controlled.

factor

Nonnegative factor to scale the amplitude by, where 1.f reverts to the default volume.

discord_voice_client & discord_voice_client & dpp::discord_voice_client::skip_to_next_marker () skip_to_next_marker dpp::discord_voice_client::skip_to_next_marker

Skip tp the next track marker, previously inserted by using the dpp::discord_voice_client::insert_marker function. If there are no markers in the output buffer, then this skips to the end of the buffer and is equivalent to the dpp::discord_voice_client::stop_audio function.

It is possible to use this function while the output stream is paused.

reference to self

void void dpp::ssl_connection::socket_write (const std::string_view data) socket_write dpp::ssl_connection::socket_write const std::string_view data

Write to the output buffer.

data

Data to be written to the buffer.

The data may not be written immediately and may be written at a later time to the socket.

discord_voice_client & discord_voice_client & dpp::discord_voice_client::speak () speak dpp::discord_voice_client::speak

Mark the voice connection as 'speaking'. This sends a JSON message to the voice websocket which tells discord that the user is speaking. The library automatically calls this for you whenever you send audio.

discord_voice_client& Reference to self

discord_voice_client & discord_voice_client & dpp::discord_voice_client::stop_audio () stop_audio dpp::discord_voice_client::stop_audio

Immediately stop all audio. Clears the packet queue.

reference to self

void virtual void dpp::websocket_client::write (const std::string_view data, ws_opcode _opcode=OP_AUTO) write dpp::websocket_client::write const std::string_view data ws_opcode _opcode OP_AUTO

Write to websocket. Encapsulates data in frames if the status is CONNECTED.

data

The data to send.

_opcode

The opcode of the data to send, either binary or text. The default is to use the socket's opcode as set in the constructor.

std::string std::string dpp::ssl_connection::buffer buffer dpp::ssl_connection::buffer

Input buffer received from socket.

uint64_t uint64_t dpp::ssl_connection::bytes_in bytes_in dpp::ssl_connection::bytes_in

Bytes in.

uint64_t uint64_t dpp::ssl_connection::bytes_out bytes_out dpp::ssl_connection::bytes_out

Bytes out.

std::string std::string dpp::ssl_connection::cipher cipher dpp::ssl_connection::cipher

SSL cipher in use.

uint8_t uint8_t dpp::ssl_connection::connect_retries connect_retries dpp::ssl_connection::connect_retries {0}

How many times we retried connect().

bool bool dpp::ssl_connection::connected connected dpp::ssl_connection::connected {false}

True if connection is completed.

std::string std::string dpp::ssl_connection::hostname hostname dpp::ssl_connection::hostname

Hostname connected to.

time_t time_t dpp::ssl_connection::last_tick last_tick dpp::ssl_connection::last_tick

For timers.

std::string std::string dpp::ssl_connection::obuffer obuffer dpp::ssl_connection::obuffer

Output buffer for sending to socket.

bool bool dpp::ssl_connection::plaintext plaintext dpp::ssl_connection::plaintext

True for a plain text connection.

bool bool dpp::ssl_connection::raw_trace raw_trace dpp::ssl_connection::raw_trace {false}

Set this to true to log all IO to debug for this connection. This is an internal developer facility. Do not enable it unless you need to, as it will be very noisy.

dpp::socket dpp::socket dpp::ssl_connection::sfd sfd dpp::ssl_connection::sfd

Raw file descriptor of connection.

openssl_connection * openssl_connection* dpp::ssl_connection::ssl ssl dpp::ssl_connection::ssl

Openssl opaque contexts.

time_t time_t dpp::ssl_connection::start start dpp::ssl_connection::start

Start time of connection.

bool bool dpp::ssl_connection::tcp_connect_done tcp_connect_done dpp::ssl_connection::tcp_connect_done {false}

True if tcp connect() succeeded.

bool bool dpp::websocket_client::timed_out timed_out dpp::websocket_client::timed_out

If true the connection timed out while waiting, when waiting for SSL negotiation, TCP connect(), or HTTP.

time_t time_t dpp::websocket_client::timeout timeout dpp::websocket_client::timeout

Time at which the connection should be abandoned, if we are still connecting or negotiating with a HTTP server.

timer timer dpp::ssl_connection::timer_handle timer_handle dpp::ssl_connection::timer_handle

Timer handle for one second timer.

uint64_t uint64_t dpp::ssl_connection::unique_id unique_id dpp::ssl_connection::unique_id

Unique ID of socket used as a nonce You can use this to identify requests vs reply if you want. D++ itself only sets this, and does not use it in any logic. It starts at 1 and increments for each request made.

void virtual void dpp::websocket_client::connect () override connect dpp::websocket_client::connect connect

Connect to websocket server.

void void dpp::ssl_connection::do_raw_trace (const std::string &message) const do_raw_trace dpp::ssl_connection::do_raw_trace const std::string & message

If raw_trace is set to true, log a debug message for this connection.

message

debug message

ws_state ws_state dpp::websocket_client::get_state () const get_state dpp::websocket_client::get_state

Get websocket state.

websocket state

void virtual void dpp::ssl_connection::on_buffer_drained () on_buffer_drained dpp::ssl_connection::on_buffer_drained on_buffer_drained
int int dpp::ssl_connection::start_connecting (dpp::socket sockfd, const struct sockaddr *addr, socklen_t addrlen) start_connecting dpp::ssl_connection::start_connecting dpp::socket sockfd const struct sockaddr * addr socklen_t addrlen

Start connecting to a TCP socket. This simply calls connect() and checks for error return, as the timeout is now handled in the main IO events for the ssl_connection class.

sockfd

socket descriptor

addr

address to connect to

addrlen

address length

timeout_ms

timeout in milliseconds

int -1 on error, 0 on success just like POSIX connect()

dpp::connection_exception

on failure

Implements a discord voice connection. Each discord_voice_client connects to one voice channel and derives from a websocket client.

dpp::discord_voice_client
dpp::ssl_connection
dpp::websocket_client
K
T
bool
cache_policy_setting_t
double
dpp::cache_policy_t
channel_policy
emoji_policy
guild_policy
role_policy
user_policy
dpp::cluster
token
last_identify
cluster_id
intents
maxclusters
numshards
rest_ping
me
cache_policy
ws_mode
terminating
request_timeout
socketengine
on_voice_channel_effect_send
on_voice_state_update
on_voice_client_platform
on_voice_client_disconnect
on_voice_client_speaking
on_log
on_socket_close
on_guild_join_request_delete
on_interaction_create
on_slashcommand
on_button_click
on_autocomplete
on_select_click
on_message_context_menu
on_user_context_menu
on_form_submit
on_guild_delete
on_channel_delete
on_channel_update
on_ready
on_message_delete
on_guild_member_remove
on_resumed
on_guild_role_create
on_typing_start
on_message_reaction_add
on_guild_members_chunk
on_message_reaction_remove
on_guild_create
on_channel_create
on_message_reaction_remove_emoji
on_message_delete_bulk
on_guild_role_update
on_guild_role_delete
on_channel_pins_update
on_message_reaction_remove_all
on_voice_server_update
on_guild_emojis_update
on_guild_stickers_update
on_presence_update
on_webhooks_update
on_automod_rule_create
on_automod_rule_update
on_automod_rule_delete
on_automod_rule_execute
on_guild_member_add
on_invite_delete
on_guild_update
on_guild_integrations_update
on_guild_member_update
on_invite_create
on_message_update
on_user_update
on_message_create
on_message_poll_vote_add
on_message_poll_vote_remove
on_guild_audit_log_entry_create
on_guild_ban_add
on_guild_ban_remove
on_integration_create
on_integration_update
on_integration_delete
on_thread_create
on_thread_update
on_thread_delete
on_thread_list_sync
on_thread_member_update
on_thread_members_update
on_guild_scheduled_event_create
on_guild_scheduled_event_update
on_guild_scheduled_event_delete
on_guild_scheduled_event_user_add
on_guild_scheduled_event_user_remove
on_voice_buffer_send
on_voice_ready
on_voice_receive
on_voice_receive_combined
on_voice_track_marker
on_stage_instance_create
on_stage_instance_update
on_stage_instance_delete
on_entitlement_create
on_entitlement_update
on_entitlement_delete
dpp::discord_voice_client
creator
reconnection_callback
terminating
current_gain
end_gain
increment
heartbeat_interval
last_heartbeat
sessionid
token
channel_id
server_id
moving_average
send_audio_type
iteration_interval
dpp::event_router_t< T >
dpp::event_router_t< dpp::autocomplete_t >
< dpp::autocomplete_t >
dpp::event_router_t< dpp::automod_rule_create_t >
< dpp::automod_rule_create_t >
dpp::event_router_t< dpp::automod_rule_delete_t >
< dpp::automod_rule_delete_t >
dpp::event_router_t< dpp::automod_rule_execute_t >
< dpp::automod_rule_execute_t >
dpp::event_router_t< dpp::automod_rule_update_t >
< dpp::automod_rule_update_t >
dpp::event_router_t< dpp::button_click_t >
< dpp::button_click_t >
dpp::event_router_t< dpp::channel_create_t >
< dpp::channel_create_t >
dpp::event_router_t< dpp::channel_delete_t >
< dpp::channel_delete_t >
dpp::event_router_t< dpp::channel_pins_update_t >
< dpp::channel_pins_update_t >
dpp::event_router_t< dpp::channel_update_t >
< dpp::channel_update_t >
dpp::event_router_t< dpp::entitlement_create_t >
< dpp::entitlement_create_t >
dpp::event_router_t< dpp::entitlement_delete_t >
< dpp::entitlement_delete_t >
dpp::event_router_t< dpp::entitlement_update_t >
< dpp::entitlement_update_t >
dpp::event_router_t< dpp::form_submit_t >
< dpp::form_submit_t >
dpp::event_router_t< dpp::guild_audit_log_entry_create_t >
< dpp::guild_audit_log_entry_create_t >
dpp::event_router_t< dpp::guild_ban_add_t >
< dpp::guild_ban_add_t >
dpp::event_router_t< dpp::guild_ban_remove_t >
< dpp::guild_ban_remove_t >
dpp::event_router_t< dpp::guild_create_t >
< dpp::guild_create_t >
dpp::event_router_t< dpp::guild_delete_t >
< dpp::guild_delete_t >
dpp::event_router_t< dpp::guild_emojis_update_t >
< dpp::guild_emojis_update_t >
dpp::event_router_t< dpp::guild_integrations_update_t >
< dpp::guild_integrations_update_t >
dpp::event_router_t< dpp::guild_join_request_delete_t >
< dpp::guild_join_request_delete_t >
dpp::event_router_t< dpp::guild_member_add_t >
< dpp::guild_member_add_t >
dpp::event_router_t< dpp::guild_member_remove_t >
< dpp::guild_member_remove_t >
dpp::event_router_t< dpp::guild_member_update_t >
< dpp::guild_member_update_t >
dpp::event_router_t< dpp::guild_members_chunk_t >
< dpp::guild_members_chunk_t >
dpp::event_router_t< dpp::guild_role_create_t >
< dpp::guild_role_create_t >
dpp::event_router_t< dpp::guild_role_delete_t >
< dpp::guild_role_delete_t >
dpp::event_router_t< dpp::guild_role_update_t >
< dpp::guild_role_update_t >
dpp::event_router_t< dpp::guild_scheduled_event_create_t >
< dpp::guild_scheduled_event_create_t >
dpp::event_router_t< dpp::guild_scheduled_event_delete_t >
< dpp::guild_scheduled_event_delete_t >
dpp::event_router_t< dpp::guild_scheduled_event_update_t >
< dpp::guild_scheduled_event_update_t >
dpp::event_router_t< dpp::guild_scheduled_event_user_add_t >
< dpp::guild_scheduled_event_user_add_t >
dpp::event_router_t< dpp::guild_scheduled_event_user_remove_t >
< dpp::guild_scheduled_event_user_remove_t >
dpp::event_router_t< dpp::guild_stickers_update_t >
< dpp::guild_stickers_update_t >
dpp::event_router_t< dpp::guild_update_t >
< dpp::guild_update_t >
dpp::event_router_t< dpp::integration_create_t >
< dpp::integration_create_t >
dpp::event_router_t< dpp::integration_delete_t >
< dpp::integration_delete_t >
dpp::event_router_t< dpp::integration_update_t >
< dpp::integration_update_t >
dpp::event_router_t< dpp::interaction_create_t >
< dpp::interaction_create_t >
dpp::event_router_t< dpp::invite_create_t >
< dpp::invite_create_t >
dpp::event_router_t< dpp::invite_delete_t >
< dpp::invite_delete_t >
dpp::event_router_t< dpp::log_t >
< dpp::log_t >
dpp::event_router_t< dpp::message_context_menu_t >
< dpp::message_context_menu_t >
dpp::event_router_t< dpp::message_create_t >
< dpp::message_create_t >
dpp::event_router_t< dpp::message_delete_bulk_t >
< dpp::message_delete_bulk_t >
dpp::event_router_t< dpp::message_delete_t >
< dpp::message_delete_t >
dpp::event_router_t< dpp::message_poll_vote_add_t >
< dpp::message_poll_vote_add_t >
dpp::event_router_t< dpp::message_poll_vote_remove_t >
< dpp::message_poll_vote_remove_t >
dpp::event_router_t< dpp::message_reaction_add_t >
< dpp::message_reaction_add_t >
dpp::event_router_t< dpp::message_reaction_remove_all_t >
< dpp::message_reaction_remove_all_t >
dpp::event_router_t< dpp::message_reaction_remove_emoji_t >
< dpp::message_reaction_remove_emoji_t >
dpp::event_router_t< dpp::message_reaction_remove_t >
< dpp::message_reaction_remove_t >
dpp::event_router_t< dpp::message_update_t >
< dpp::message_update_t >
dpp::event_router_t< dpp::presence_update_t >
< dpp::presence_update_t >
dpp::event_router_t< dpp::ready_t >
< dpp::ready_t >
dpp::event_router_t< dpp::resumed_t >
< dpp::resumed_t >
dpp::event_router_t< dpp::select_click_t >
< dpp::select_click_t >
dpp::event_router_t< dpp::slashcommand_t >
< dpp::slashcommand_t >
dpp::event_router_t< dpp::socket_close_t >
< dpp::socket_close_t >
dpp::event_router_t< dpp::stage_instance_create_t >
< dpp::stage_instance_create_t >
dpp::event_router_t< dpp::stage_instance_delete_t >
< dpp::stage_instance_delete_t >
dpp::event_router_t< dpp::stage_instance_update_t >
< dpp::stage_instance_update_t >
dpp::event_router_t< dpp::thread_create_t >
< dpp::thread_create_t >
dpp::event_router_t< dpp::thread_delete_t >
< dpp::thread_delete_t >
dpp::event_router_t< dpp::thread_list_sync_t >
< dpp::thread_list_sync_t >
dpp::event_router_t< dpp::thread_member_update_t >
< dpp::thread_member_update_t >
dpp::event_router_t< dpp::thread_members_update_t >
< dpp::thread_members_update_t >
dpp::event_router_t< dpp::thread_update_t >
< dpp::thread_update_t >
dpp::event_router_t< dpp::typing_start_t >
< dpp::typing_start_t >
dpp::event_router_t< dpp::user_context_menu_t >
< dpp::user_context_menu_t >
dpp::event_router_t< dpp::user_update_t >
< dpp::user_update_t >
dpp::event_router_t< dpp::voice_buffer_send_t >
< dpp::voice_buffer_send_t >
dpp::event_router_t< dpp::voice_channel_effect_send_t >
< dpp::voice_channel_effect_send_t >
dpp::event_router_t< dpp::voice_client_disconnect_t >
< dpp::voice_client_disconnect_t >
dpp::event_router_t< dpp::voice_client_platform_t >
< dpp::voice_client_platform_t >
dpp::event_router_t< dpp::voice_client_speaking_t >
< dpp::voice_client_speaking_t >
dpp::event_router_t< dpp::voice_ready_t >
< dpp::voice_ready_t >
dpp::event_router_t< dpp::voice_receive_t >
< dpp::voice_receive_t >
dpp::event_router_t< dpp::voice_server_update_t >
< dpp::voice_server_update_t >
dpp::event_router_t< dpp::voice_state_update_t >
< dpp::voice_state_update_t >
dpp::event_router_t< dpp::voice_track_marker_t >
< dpp::voice_track_marker_t >
dpp::event_router_t< dpp::webhooks_update_t >
< dpp::webhooks_update_t >
dpp::json_interface< T >
dpp::json_interface< user >
< user >
dpp::managed
id
dpp::moving_averager
values
collectionCount
dpp::snowflake
value
dpp::socket_engine_base
owner
fds_mutex
fds
stats
dpp::socket_stats
active_fds
deletions
errors
iterations
reads
updates
writes
engine_type
dpp::ssl_connection
buffer
cipher
hostname
obuffer
port
private_key_file
public_key_file
sfd
ssl
last_tick
start
connect_retries
bytes_in
bytes_out
unique_id
connected
keepalive
plaintext
raw_trace
tcp_connect_done
timer_handle
owner
dpp::user
global_name
username
avatar
avatar_decoration
primary_guild
flags
discriminator
refcount
dpp::utility::iconhash
first
second
dpp::utility::primaryguild
id
enabled
tag
badge
dpp::websocket_client
timed_out
timeout
send_audio_type_t
float
int
int64_t
openssl_connection *
size_t
atomic_bool
std::basic_string< Char >
std::basic_string_view< Char >
std::deque< T >
elements
std::deque< int64_t >
elements
< int64_t >
function< void()>
std::shared_mutex
std::string
std::string_view
std::unique_ptr< T >
ptr
std::unique_ptr< dpp::socket_engine_base >
ptr
< dpp::socket_engine_base >
std::unordered_map< K, T >
keys
elements
std::unordered_map< dpp::socket, std::unique_ptr< socket_events > >
< dpp::socket, std::unique_ptr< socket_events > >
time_t
uint16_t
uint32_t
uint64_t
uint8_t
websocket_protocol_t
- dpp::discord_voice_client
  buffer
- dpp::discord_voice_client
  bytes_in
- dpp::discord_voice_client
  bytes_out
- dpp::discord_voice_client
  channel_id
- dpp::discord_voice_client
  cipher
- dpp::discord_voice_client
  cleanup
- dpp::discord_voice_client
  clear_queue
- dpp::discord_voice_client
  close
- dpp::discord_voice_client
  complete_handshake
- dpp::discord_voice_client
  connect
- dpp::discord_voice_client
  connect_retries
- dpp::discord_voice_client
  connect_time
- dpp::discord_voice_client
  connected
- dpp::discord_voice_client
  creator
- dpp::discord_voice_client
  current_gain
- dpp::discord_voice_client
  dave_mls_pending_remove_list
- dpp::discord_voice_client
  dave_mls_user_list
- dpp::discord_voice_client
  dave_version
- dpp::discord_voice_client
  destination
- dpp::discord_voice_client
  discord_voice_client
- dpp::discord_voice_client
  discover_ip
- dpp::discord_voice_client
  do_raw_trace
- dpp::discord_voice_client
  enable_raw_tracing
- dpp::discord_voice_client
  encode
- dpp::discord_voice_client
  encode_buffer
- dpp::discord_voice_client
  encoder
- dpp::discord_voice_client
  end_gain
- dpp::discord_voice_client
  error
- dpp::discord_voice_client
  execute_pending_upgrade_downgrade
- dpp::discord_voice_client
  external_ip
- dpp::discord_voice_client
  fd
- dpp::discord_voice_client
  get_bytes_in
- dpp::discord_voice_client
  get_bytes_out
- dpp::discord_voice_client
  get_cipher
- dpp::discord_voice_client
  get_iteration_interval
- dpp::discord_voice_client
  get_marker_metadata
- dpp::discord_voice_client
  get_privacy_code
- dpp::discord_voice_client
  get_queue_size
- dpp::discord_voice_client
  get_remaining
- dpp::discord_voice_client
  get_secs_remaining
- dpp::discord_voice_client
  get_state
- dpp::discord_voice_client
  get_timescale
- dpp::discord_voice_client
  get_tracks_remaining
- dpp::discord_voice_client
  get_unique_id
- dpp::discord_voice_client
  get_uptime
- dpp::discord_voice_client
  get_user_privacy_code
- dpp::discord_voice_client
  handle_buffer
- dpp::discord_voice_client
  handle_frame
- dpp::discord_voice_client
  has_secret_key
- dpp::discord_voice_client
  heartbeat_interval
- dpp::discord_voice_client
  hostname
- dpp::discord_voice_client
  increment
- dpp::discord_voice_client
  insert_marker
- dpp::discord_voice_client
  ip
- dpp::discord_voice_client
  is_connected
- dpp::discord_voice_client
  is_end_to_end_encrypted
- dpp::discord_voice_client
  is_paused
- dpp::discord_voice_client
  is_playing
- dpp::discord_voice_client
  is_ready
- dpp::discord_voice_client
  iteration_interval
- dpp::discord_voice_client
  keepalive
- dpp::discord_voice_client
  last_heartbeat
- dpp::discord_voice_client
  last_loop_time
- dpp::discord_voice_client
  last_sleep_remainder
- dpp::discord_voice_client
  last_tick
- dpp::discord_voice_client
  last_timestamp
- dpp::discord_voice_client
  log
- dpp::discord_voice_client
  message_queue
- dpp::discord_voice_client
  mixer
- dpp::discord_voice_client
  mls_state
- dpp::discord_voice_client
  modes
- dpp::discord_voice_client
  moving_average
- dpp::discord_voice_client
  obuffer
- dpp::discord_voice_client
  on_buffer_drained
- dpp::discord_voice_client
  on_disconnect
- dpp::discord_voice_client
  on_error
- dpp::discord_voice_client
  on_read
- dpp::discord_voice_client
  on_write
- dpp::discord_voice_client
  one_second_timer
- dpp::discord_voice_client
  outbuf
- dpp::discord_voice_client
  owner
- dpp::discord_voice_client
  packet_nonce
- dpp::discord_voice_client
  pause_audio
- dpp::discord_voice_client
  paused
- dpp::discord_voice_client
  plaintext
- dpp::discord_voice_client
  port
- dpp::discord_voice_client
  private_key_file
- dpp::discord_voice_client
  process_mls_group_rosters
- dpp::discord_voice_client
  public_key_file
- dpp::discord_voice_client
  queue_message
- dpp::discord_voice_client
  queue_mutex
- dpp::discord_voice_client
  raw_trace
- dpp::discord_voice_client
  read_loop
- dpp::discord_voice_client
  read_ready
- dpp::discord_voice_client
  ready_for_transition
- dpp::discord_voice_client
  receive_sequence
- dpp::discord_voice_client
  reconnection_callback
- dpp::discord_voice_client
  recover_from_invalid_commit_welcome
- dpp::discord_voice_client
  reinit_dave_mls_group
- dpp::discord_voice_client
  repacketizer
- dpp::discord_voice_client
  rtp_seq_t
- dpp::discord_voice_client
  rtp_timestamp_t
- dpp::discord_voice_client
  run
- dpp::discord_voice_client
  satype_live_audio
- dpp::discord_voice_client
  satype_overlap_audio
- dpp::discord_voice_client
  satype_recorded_audio
- dpp::discord_voice_client
  secret_key
- dpp::discord_voice_client
  send
- dpp::discord_voice_client
  send_audio_opus
- dpp::discord_voice_client
  send_audio_opus
- dpp::discord_voice_client
  send_audio_raw
- dpp::discord_voice_client
  send_audio_type
- dpp::discord_voice_client
  send_audio_type_t
- dpp::discord_voice_client
  send_close_packet
- dpp::discord_voice_client
  send_silence
- dpp::discord_voice_client
  send_stop_frames
- dpp::discord_voice_client
  sending
- dpp::discord_voice_client
  sent_stop_frames
- dpp::discord_voice_client
  sequence
- dpp::discord_voice_client
  server_id
- dpp::discord_voice_client
  sessionid
- dpp::discord_voice_client
  set_iteration_interval
- dpp::discord_voice_client
  set_send_audio_type
- dpp::discord_voice_client
  set_timescale
- dpp::discord_voice_client
  set_user_gain
- dpp::discord_voice_client
  setup
- dpp::discord_voice_client
  sfd
- dpp::discord_voice_client
  silence_packet
- dpp::discord_voice_client
  skip_to_next_marker
- dpp::discord_voice_client
  socket_write
- dpp::discord_voice_client
  speak
- dpp::discord_voice_client
  ssl
- dpp::discord_voice_client
  ssl_connection
- dpp::discord_voice_client
  ssl_connection
- dpp::discord_voice_client
  ssrc
- dpp::discord_voice_client
  ssrc_map
- dpp::discord_voice_client
  start
- dpp::discord_voice_client
  start_connecting
- dpp::discord_voice_client
  stop_audio
- dpp::discord_voice_client
  stream_mutex
- dpp::discord_voice_client
  tcp_connect_done
- dpp::discord_voice_client
  terminating
- dpp::discord_voice_client
  timed_out
- dpp::discord_voice_client
  timeout
- dpp::discord_voice_client
  timer_handle
- dpp::discord_voice_client
  times_looped
- dpp::discord_voice_client
  timescale
- dpp::discord_voice_client
  timestamp
- dpp::discord_voice_client
  token
- dpp::discord_voice_client
  track_meta
- dpp::discord_voice_client
  tracks
- dpp::discord_voice_client
  udp_events
- dpp::discord_voice_client
  udp_recv
- dpp::discord_voice_client
  udp_send
- dpp::discord_voice_client
  unique_id
- dpp::discord_voice_client
  update_ratchets
- dpp::discord_voice_client
  voice_courier
- dpp::discord_voice_client
  voice_courier_loop
- dpp::discord_voice_client
  voice_courier_shared_state
- dpp::discord_voice_client
  websocket_client
- dpp::discord_voice_client
  write
- dpp::discord_voice_client
  write_ready
- dpp::discord_voice_client
  ~discord_voice_client
- dpp::discord_voice_client
  ~ssl_connection
- dpp::discord_voice_client
  ~websocket_client