Class NettyUtil

java.lang.Object
com.hypixel.hytale.server.core.io.netty.NettyUtil

public class NettyUtil extends Object
  • Field Details

  • 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

      @Nonnull public static io.netty.channel.EventLoopGroup getEventLoopGroup(String name)
    • getEventLoopGroup

      @Nonnull public static io.netty.channel.EventLoopGroup getEventLoopGroup(int nThreads, String name)
    • getServerChannel

      @Nonnull public static Class<? extends io.netty.channel.ServerChannel> getServerChannel()
    • getDatagramChannelFactory

      @Nonnull public static NettyUtil.ReflectiveChannelFactory<? extends io.netty.channel.socket.DatagramChannel> getDatagramChannelFactory(io.netty.channel.socket.SocketProtocolFamily family)
    • formatRemoteAddress

      public static String formatRemoteAddress(io.netty.channel.Channel channel)
    • formatLocalAddress

      public static String formatLocalAddress(io.netty.channel.Channel channel)
    • getRemoteSocketAddress

      @Nullable public static SocketAddress getRemoteSocketAddress(io.netty.channel.Channel channel)
    • isFromSameOrigin

      public static boolean isFromSameOrigin(io.netty.channel.Channel channel1, io.netty.channel.Channel channel2)