class Discord::VoiceUDP
- Discord::VoiceUDP
- Reference
- Object
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.crConstructors
Instance Method Summary
- #connect(endpoint : String, port : UInt32, ssrc : UInt32)
- #mode : String?
- #mode=(mode : Nil | String)
-
#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
- #secret_key : Slice(UInt8)?
- #secret_key=(secret_key : Slice(UInt8) | Nil)
-
#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)
-
#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
- #socket : UDPSocket
Constructor Detail
Instance Method Detail
Awaits a response to the discovery request and returns our local IP and port once the response is received
Sends 20 ms of opus audio data to Discord, with the specified sequence and time (used on the receiving client to synchronise packets)
Sends a discovery packet to Discord, telling them that we want to know our IP so we can select the protocol on the VWS