class Discord::VoiceUDP


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:



Instance Method Summary

Constructor Detail

def #

[View source]

Instance Method Detail

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

[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]