class Discord::VoiceUDP

Overview

Client for Discord's voice UDP protocol, on which the actual audio data is sent. There should be no reason to manually use this class: use VoiceClient instead which uses this class internally.

Defined in:

discordcr/voice.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def connect(endpoint : String, port : UInt32, ssrc : UInt32) #

[View source]
def mode : String? #

[View source]
def mode=(mode) #

[View source]
def receive_discovery_reply : Tuple(String, UInt16) #

Awaits a response to the discovery request and returns our local IP and port once the response is received


[View source]
def secret_key : Slice(UInt8)? #

[View source]
def secret_key=(secret_key) #

[View source]
def send_audio(buf, sequence, time) #

Sends 20 ms of opus audio data to Discord, with the specified sequence and time (used on the receiving client to synchronise packets)


[View source]
def send_discovery #

Sends a discovery packet to Discord, telling them that we want to know our IP so we can select the protocol on the VWS


[View source]
def socket : UDPSocket #

[View source]