UdpConnection

interface UdpConnection

Identified UDP connection.

Functions

Link copied to clipboard
abstract fun disconnect()
Disconnects the UDP connection and sets its connected state to false.
Link copied to clipboard
@NotNull
abstract fun getPlayer(): @NotNull VoicePlayer
Gets the VoicePlayer associated with this connection.
Link copied to clipboard
@NotNull
abstract fun getRemoteAddress(): @NotNull InetSocketAddress
Gets the connection's remote address.
Link copied to clipboard
@NotNull
abstract fun getSecret(): @NotNull UUID
Gets the connection's secret.
Link copied to clipboard
Handles a UDP packet received from the player.
Link copied to clipboard
abstract fun isConnected(): Boolean
Checks if the connection is alive.
Link copied to clipboard
abstract fun sendPacket(packet: Packet<out Any>)
Sends a packet to the UDP connection.
Link copied to clipboard
abstract fun setRemoteAddress(@NotNull remoteAddress: @NotNull InetSocketAddress)
Sets the connection's remote address.