export declare class Networking extends EventEmitter
Manages the networking required to maintain a voice connection and dispatch audio packets
Constructors
options: ConnectionOptionsdebug: boolean) constructor(
options: ConnectionOptions
debug: boolean
Creates a new Networking instance.
NetworkingState state :
The current state of the networking instance.
destroyvoid () :
Destroys the Networking instance, transitioning it into the Closed state.
dispatchAudioboolean () :
Dispatches the audio packet previously prepared by prepareAudioPacket(opusPacket). The audio packet is consumed and cannot be dispatched again.
Prepares an Opus packet for playback. This includes attaching metadata to it and encrypting it. It will be stored within the instance, and can be played by dispatchAudio()
Returns: The audio packet that was prepared
Sends a packet to the voice gateway indicating that the client has start/stopped sending audio.