public class NetworkManager
extends io.netty.channel.SimpleChannelInboundHandler
Modifier and Type | Field and Description |
---|---|
static io.netty.util.AttributeKey |
attrKeyConnectionState |
static io.netty.util.AttributeKey |
attrKeyReceivable |
static io.netty.util.AttributeKey |
attrKeySendable |
static io.netty.channel.nio.NioEventLoopGroup |
eventLoops |
static org.apache.logging.log4j.Marker |
logMarkerNetwork |
static org.apache.logging.log4j.Marker |
logMarkerPackets |
Constructor and Description |
---|
NetworkManager(boolean p_i45147_1_) |
Modifier and Type | Method and Description |
---|---|
io.netty.channel.Channel |
channel() |
void |
channelActive(io.netty.channel.ChannelHandlerContext p_channelActive_1_) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext p_channelInactive_1_) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext p_channelRead0_1_,
java.lang.Object p_channelRead0_2_) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext p_150728_1_,
Packet p_150728_2_) |
void |
closeChannel(IChatComponent p_150718_1_) |
void |
disableAutoRead() |
void |
enableEncryption(javax.crypto.SecretKey p_150727_1_) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext p_exceptionCaught_1_,
java.lang.Throwable p_exceptionCaught_2_) |
IChatComponent |
getExitMessage() |
INetHandler |
getNetHandler() |
java.net.SocketAddress |
getSocketAddress() |
boolean |
isChannelOpen() |
boolean |
isLocalChannel() |
void |
processReceivedPackets() |
static NetworkManager |
provideLanClient(java.net.InetAddress p_150726_0_,
int p_150726_1_) |
static NetworkManager |
provideLocalClient(java.net.SocketAddress p_150722_0_) |
void |
scheduleOutboundPacket(Packet p_150725_1_,
io.netty.util.concurrent.GenericFutureListener... p_150725_2_) |
void |
setConnectionState(EnumConnectionState p_150723_1_) |
void |
setNetHandler(INetHandler p_150719_1_) |
acceptInboundMessage, channelRead
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public static final org.apache.logging.log4j.Marker logMarkerNetwork
public static final org.apache.logging.log4j.Marker logMarkerPackets
public static final io.netty.util.AttributeKey attrKeyConnectionState
public static final io.netty.util.AttributeKey attrKeyReceivable
public static final io.netty.util.AttributeKey attrKeySendable
public static final io.netty.channel.nio.NioEventLoopGroup eventLoops
public void channelActive(io.netty.channel.ChannelHandlerContext p_channelActive_1_) throws java.lang.Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
java.lang.Exception
public void setConnectionState(EnumConnectionState p_150723_1_)
public void channelInactive(io.netty.channel.ChannelHandlerContext p_channelInactive_1_)
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
public void exceptionCaught(io.netty.channel.ChannelHandlerContext p_exceptionCaught_1_, java.lang.Throwable p_exceptionCaught_2_)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
protected void channelRead0(io.netty.channel.ChannelHandlerContext p_150728_1_, Packet p_150728_2_)
public void setNetHandler(INetHandler p_150719_1_)
public void scheduleOutboundPacket(Packet p_150725_1_, io.netty.util.concurrent.GenericFutureListener... p_150725_2_)
public void processReceivedPackets()
public java.net.SocketAddress getSocketAddress()
public void closeChannel(IChatComponent p_150718_1_)
public boolean isLocalChannel()
public static NetworkManager provideLanClient(java.net.InetAddress p_150726_0_, int p_150726_1_)
public static NetworkManager provideLocalClient(java.net.SocketAddress p_150722_0_)
public void enableEncryption(javax.crypto.SecretKey p_150727_1_)
public boolean isChannelOpen()
public INetHandler getNetHandler()
public IChatComponent getExitMessage()
public void disableAutoRead()
protected void channelRead0(io.netty.channel.ChannelHandlerContext p_channelRead0_1_, java.lang.Object p_channelRead0_2_)
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler
public io.netty.channel.Channel channel()