Package moe.kyokobot.koe.handler
Interface ConnectionHandler<R>
- Type Parameters:
R- type of the result returned if connection succeeds
- All Known Implementing Classes:
DiscordUDPConnection
@NonExtendable
public interface ConnectionHandler<R>
This interface specifies Discord voice connection handler, allowing to implement other methods of establishing voice
connections/transmitting audio packets eg. TCP or browser/WebRTC way via ICE instead of their minimalistic custom
discovery protocol.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()connect()voidhandleSessionDescription(JsonObject object) default voidsendFrame(CodecInstance codec, int timestamp, io.netty.buffer.ByteBuf data, int start) voidsendFrame(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int start, boolean extension)
-
Method Details
-
close
void close() -
handleSessionDescription
-
sendFrame
-
connect
CompletionStage<R> connect() -
sendFrame
void sendFrame(CodecType codecType, byte payloadType, int timestamp, io.netty.buffer.ByteBuf data, int start, boolean extension) - Parameters:
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.
-