Class DiscordUDPConnection
java.lang.Object
moe.kyokobot.koe.internal.handler.DiscordUDPConnection
- All Implemented Interfaces:
Closeable,AutoCloseable,ConnectionHandler<InetSocketAddress>
public class DiscordUDPConnection
extends Object
implements Closeable, ConnectionHandler<InetSocketAddress>
-
Constructor Summary
ConstructorsConstructorDescriptionDiscordUDPConnection(MediaConnectionImpl voiceConnection, SocketAddress serverAddress, int ssrc) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()connect()io.netty.buffer.ByteBufcreatePacket(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int len, boolean extension) byte[]intgetSsrc()voidhandleSessionDescription(JsonObject object) charnextSeq()voidsendFrame(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int len, boolean extension) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface moe.kyokobot.koe.handler.ConnectionHandler
sendFrame
-
Constructor Details
-
DiscordUDPConnection
public DiscordUDPConnection(MediaConnectionImpl voiceConnection, SocketAddress serverAddress, int ssrc)
-
-
Method Details
-
connect
- Specified by:
connectin interfaceConnectionHandler<InetSocketAddress>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceConnectionHandler<InetSocketAddress>
-
handleSessionDescription
- Specified by:
handleSessionDescriptionin interfaceConnectionHandler<InetSocketAddress>
-
sendFrame
public void sendFrame(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int len, boolean extension) - Specified by:
sendFramein interfaceConnectionHandler<InetSocketAddress>extension- true ifdatastarts with an RTP header extension, including its 4 byte preamble. The extension is sent as part of the RTP header and is not end-to-end encrypted.
-
createPacket
public io.netty.buffer.ByteBuf createPacket(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int len, boolean extension) -
nextSeq
public char nextSeq() -
getSecretKey
public byte[] getSecretKey() -
getSsrc
public int getSsrc() -
getEncryptionMode
-
getServerAddress
-