class VoiceUDPSocket

extends

EventEmitter
export declare class VoiceUDPSocket extends EventEmitter

Manages the UDP networking for a voice connection.

Constructors

constructor(
remote: SocketConfig
)

Creates a new VoiceUDPSocket.

deprecatedoptional
ping? : number

The time taken to receive a response to keep alive messages.

destroy() : void

Closes the socket, the instance will not be able to be reused.

performIPDiscovery(
ssrc: number
) : Promise<SocketConfig>

Performs IP discovery to discover the local address and port to be used for the voice connection.

send(
buffer: Buffer
) : void

Sends a buffer to Discord.

on(
event: 'error'
listener: (error: Error) => void
) : this