Package net.minecraft.network
Class NetworkManager
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<IPacket<?>>
net.minecraft.network.NetworkManager
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
RateLimitedNetworkManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionprivate Consumer<NetworkManager>
private SocketAddress
static final io.netty.util.AttributeKey<ProtocolType>
private float
private float
private io.netty.channel.Channel
private ITextComponent
private boolean
private boolean
private boolean
static final LazyValue<io.netty.channel.DefaultEventLoopGroup>
private static final org.apache.logging.log4j.Logger
static final LazyValue<io.netty.channel.epoll.EpollEventLoopGroup>
static final LazyValue<io.netty.channel.nio.NioEventLoopGroup>
static final org.apache.logging.log4j.Marker
private INetHandler
private final Queue<NetworkManager.QueuedPacket>
private int
private final PacketDirection
static final org.apache.logging.log4j.Marker
private int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.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_, IPacket<?> p_channelRead0_2_) static NetworkManager
connectToLocalServer
(SocketAddress p_150722_0_) static NetworkManager
connectToServer
(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) void
disconnect
(ITextComponent p_150718_1_) void
exceptionCaught
(io.netty.channel.ChannelHandlerContext p_exceptionCaught_1_, Throwable p_exceptionCaught_2_) private void
private static <T extends INetHandler>
voidgenericsFtw
(IPacket<T> p_197664_0_, INetHandler p_197664_1_) float
float
void
boolean
boolean
boolean
boolean
void
void
send
(IPacket<?> p_201058_1_, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> p_201058_2_) private void
sendPacket
(IPacket<?> p_150732_1_, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> p_150732_2_) void
setEncryptionKey
(Cipher p_244777_1_, Cipher p_244777_2_) void
setListener
(INetHandler p_150719_1_) void
setProtocol
(ProtocolType p_150723_1_) void
void
setupCompression
(int p_179289_1_) void
tick()
protected void
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ROOT_MARKER
public static final org.apache.logging.log4j.Marker ROOT_MARKER -
PACKET_MARKER
public static final org.apache.logging.log4j.Marker PACKET_MARKER -
ATTRIBUTE_PROTOCOL
-
NETWORK_WORKER_GROUP
-
NETWORK_EPOLL_WORKER_GROUP
public static final LazyValue<io.netty.channel.epoll.EpollEventLoopGroup> NETWORK_EPOLL_WORKER_GROUP -
LOCAL_WORKER_GROUP
-
receiving
-
queue
-
channel
private io.netty.channel.Channel channel -
address
-
packetListener
-
disconnectedReason
-
encrypted
private boolean encrypted -
disconnectionHandled
private boolean disconnectionHandled -
receivedPackets
private int receivedPackets -
sentPackets
private int sentPackets -
averageReceivedPackets
private float averageReceivedPackets -
averageSentPackets
private float averageSentPackets -
tickCount
private int tickCount -
handlingFault
private boolean handlingFault -
activationHandler
-
-
Constructor Details
-
NetworkManager
-
-
Method Details
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext p_channelActive_1_) throws Exception - Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
setProtocol
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext p_channelInactive_1_) throws Exception - Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext p_exceptionCaught_1_, Throwable p_exceptionCaught_2_) - Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead0
-
genericsFtw
private static <T extends INetHandler> void genericsFtw(IPacket<T> p_197664_0_, INetHandler p_197664_1_) -
setListener
-
send
-
send
-
sendPacket
-
flushQueue
private void flushQueue() -
tick
public void tick() -
tickSecond
protected void tickSecond() -
getRemoteAddress
-
disconnect
-
isMemoryConnection
public boolean isMemoryConnection() -
connectToServer
public static NetworkManager connectToServer(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) -
connectToLocalServer
-
setEncryptionKey
-
isEncrypted
public boolean isEncrypted() -
isConnected
public boolean isConnected() -
isConnecting
public boolean isConnecting() -
getPacketListener
-
getDisconnectedReason
-
setReadOnly
public void setReadOnly() -
setupCompression
public void setupCompression(int p_179289_1_) -
handleDisconnection
public void handleDisconnection() -
getAverageReceivedPackets
public float getAverageReceivedPackets() -
getAverageSentPackets
public float getAverageSentPackets() -
channel
public io.netty.channel.Channel channel() -
getDirection
-