public class BedrockPeer
extends io.netty.channel.ChannelInboundHandlerAdapter
BedrockSessions.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| Constructor and Description |
|---|
BedrockPeer(io.netty.channel.Channel channel,
BedrockSessionFactory sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
protected void |
checkForClosed() |
void |
close(java.lang.String reason) |
void |
enableEncryption(@NonNull javax.crypto.SecretKey secretKey) |
org.cloudburstmc.protocol.bedrock.codec.BedrockCodec |
getCodec() |
org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper |
getCodecHelper() |
java.net.SocketAddress |
getSocketAddress() |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
boolean |
isConnected() |
boolean |
isConnecting() |
protected void |
onBedrockPacket(BedrockPacketWrapper wrapper) |
protected void |
onClose() |
protected void |
removeSession(BedrockSession session) |
void |
sendPacket(int senderClientId,
int targetClientId,
org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet) |
void |
sendPacketImmediately(int senderClientId,
int targetClientId,
org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet) |
void |
setCodec(org.cloudburstmc.protocol.bedrock.codec.BedrockCodec codec) |
void |
setCompression(org.cloudburstmc.protocol.bedrock.data.PacketCompressionAlgorithm algorithm) |
void |
setCompressionLevel(int level) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharablepublic static final java.lang.String NAME
public BedrockPeer(io.netty.channel.Channel channel,
BedrockSessionFactory sessionFactory)
protected void onBedrockPacket(BedrockPacketWrapper wrapper)
protected void checkForClosed()
protected void removeSession(BedrockSession session)
public void sendPacket(int senderClientId,
int targetClientId,
org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet)
public void sendPacketImmediately(int senderClientId,
int targetClientId,
org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet)
public void enableEncryption(@NonNull javax.crypto.SecretKey secretKey)
public void setCompression(org.cloudburstmc.protocol.bedrock.data.PacketCompressionAlgorithm algorithm)
public void setCompressionLevel(int level)
public org.cloudburstmc.protocol.bedrock.codec.BedrockCodec getCodec()
public org.cloudburstmc.protocol.bedrock.codec.BedrockCodecHelper getCodecHelper()
public void setCodec(org.cloudburstmc.protocol.bedrock.codec.BedrockCodec codec)
public void close(java.lang.String reason)
protected void onClose()
public boolean isConnected()
public boolean isConnecting()
public java.net.SocketAddress getSocketAddress()
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
throws java.lang.Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exception