UdpClient

interface UdpClient

UDP client for receiving and sending audio packets to the UDP voice server.

Functions

Link copied to clipboard
abstract fun close(@NotNull reason: @NotNull UdpClientClosedEvent.Reason)
Closes the UDP client with the specified reason.
Link copied to clipboard
abstract fun connect(@NotNull ip: @NotNull String, port: Int)
Connects the UDP client to the specified IP address and port.
Link copied to clipboard
Gets the remote address to which the UDP client is connected.
Link copied to clipboard
@NotNull
abstract fun getSecret(): @NotNull UUID
Gets the secret associated with the UDP client.
Link copied to clipboard
abstract fun isClosed(): Boolean
Checks if the UDP client is closed.
Link copied to clipboard
abstract fun isConnected(): Boolean
Checks if the UDP client is connected.
Link copied to clipboard
abstract fun isTimedOut(): Boolean
Checks if the UDP client has timed out.
Link copied to clipboard
abstract fun sendPacket(packet: Packet<out Any>)
Sends a packet through the UDP client.