Class NettyUtil
java.lang.Object
com.hypixel.hytale.server.core.io.netty.NettyUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNettyUtil.ReflectiveChannelFactory<T extends io.netty.channel.Channel> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.hypixel.hytale.logger.HytaleLoggerstatic final Stringstatic final io.netty.handler.logging.LoggingHandlerstatic final Stringstatic final Stringstatic final PacketArrayEncoderstatic final Stringstatic final Stringstatic final com.hypixel.hytale.logger.HytaleLoggerstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatLocalAddress(io.netty.channel.Channel channel) static StringformatRemoteAddress(io.netty.channel.Channel channel) static NettyUtil.ReflectiveChannelFactory<? extends io.netty.channel.socket.DatagramChannel> getDatagramChannelFactory(io.netty.channel.socket.SocketProtocolFamily family) static io.netty.channel.EventLoopGroupgetEventLoopGroup(int nThreads, String name) static io.netty.channel.EventLoopGroupgetEventLoopGroup(String name) static SocketAddressgetRemoteSocketAddress(io.netty.channel.Channel channel) static Class<? extends io.netty.channel.ServerChannel> static voidinit()private static voidinjectLogger(io.netty.channel.Channel channel) static booleanisFromSameOrigin(io.netty.channel.Channel channel1, io.netty.channel.Channel channel2) static voidsetChannelHandler(io.netty.channel.Channel channel, PacketHandler packetHandler) private static voiduninjectLogger(io.netty.channel.Channel channel)
-
Field Details
-
CONNECTION_EXCEPTION_LOGGER
public static final com.hypixel.hytale.logger.HytaleLogger CONNECTION_EXCEPTION_LOGGER -
PACKET_LOGGER
public static final com.hypixel.hytale.logger.HytaleLogger PACKET_LOGGER -
PACKET_DECODER
- See Also:
-
PACKET_ARRAY_ENCODER
- See Also:
-
PACKET_ARRAY_ENCODER_INSTANCE
-
PACKET_ENCODER
- See Also:
-
LOGGER_KEY
- See Also:
-
LOGGER
public static final io.netty.handler.logging.LoggingHandler LOGGER -
HANDLER
- See Also:
-
TIMEOUT_HANDLER
- See Also:
-
RATE_LIMIT
- See Also:
-
-
Constructor Details
-
NettyUtil
public NettyUtil()
-
-
Method Details
-
init
public static void init() -
injectLogger
private static void injectLogger(@Nonnull io.netty.channel.Channel channel) -
uninjectLogger
private static void uninjectLogger(@Nonnull io.netty.channel.Channel channel) -
setChannelHandler
public static void setChannelHandler(@Nonnull io.netty.channel.Channel channel, @Nonnull PacketHandler packetHandler) -
getEventLoopGroup
-
getEventLoopGroup
-
getServerChannel
-
getDatagramChannelFactory
@Nonnull public static NettyUtil.ReflectiveChannelFactory<? extends io.netty.channel.socket.DatagramChannel> getDatagramChannelFactory(io.netty.channel.socket.SocketProtocolFamily family) -
formatRemoteAddress
-
formatLocalAddress
-
getRemoteSocketAddress
-
isFromSameOrigin
public static boolean isFromSameOrigin(io.netty.channel.Channel channel1, io.netty.channel.Channel channel2)
-