public class BedrockPeer
extends io.netty.channel.ChannelInboundHandlerAdapter
BedrockSessions.| 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,
Object msg) |
protected void |
checkForClosed() |
void |
close(String reason) |
void |
enableEncryption(SecretKey secretKey) |
BedrockCodec |
getCodec() |
BedrockCodecHelper |
getCodecHelper() |
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,
BedrockPacket packet) |
void |
sendPacketImmediately(int senderClientId,
int targetClientId,
BedrockPacket packet) |
void |
setCodec(BedrockCodec codec) |
void |
setCompression(PacketCompressionAlgorithm algorithm) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharablepublic static final 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,
BedrockPacket packet)
public void sendPacketImmediately(int senderClientId,
int targetClientId,
BedrockPacket packet)
public void setCompression(PacketCompressionAlgorithm algorithm)
public BedrockCodec getCodec()
public BedrockCodecHelper getCodecHelper()
public void setCodec(BedrockCodec codec)
public void close(String reason)
protected void onClose()
public boolean isConnected()
public boolean isConnecting()
public 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 Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2018–2022 CloudburstMC. All rights reserved.