Class NettyUtils
- java.lang.Object
-
- de.dytanic.cloudnet.driver.network.netty.NettyUtils
-
@Internal public final class NettyUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel>getClientChannelFactory()static io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel>getServerChannelFactory()static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel>getServerSocketChannelClass()Deprecated.static java.lang.Class<? extends io.netty.channel.socket.SocketChannel>getSocketChannelClass()Deprecated.static intgetThreadAmount()static io.netty.channel.EventLoopGroupnewEventLoopGroup()static java.util.concurrent.ExecutornewPacketDispatcher()static byte[]readByteArray(io.netty.buffer.ByteBuf byteBuf, int size)static java.lang.StringreadString(io.netty.buffer.ByteBuf byteBuf)static intreadVarInt(io.netty.buffer.ByteBuf byteBuf)static longreadVarLong(io.netty.buffer.ByteBuf byteBuf)static java.util.concurrent.ThreadFactorythreadFactory()static byte[]toByteArray(io.netty.buffer.ByteBuf byteBuf, int size)Deprecated.static io.netty.buffer.ByteBufwriteString(io.netty.buffer.ByteBuf byteBuf, java.lang.String string)static io.netty.buffer.ByteBufwriteVarInt(io.netty.buffer.ByteBuf byteBuf, int value)static io.netty.buffer.ByteBufwriteVarLong(io.netty.buffer.ByteBuf byteBuf, long value)
-
-
-
Method Detail
-
newEventLoopGroup
public static io.netty.channel.EventLoopGroup newEventLoopGroup()
-
newPacketDispatcher
public static java.util.concurrent.Executor newPacketDispatcher()
-
getSocketChannelClass
@Deprecated @ScheduledForRemoval public static java.lang.Class<? extends io.netty.channel.socket.SocketChannel> getSocketChannelClass()
Deprecated.
-
getClientChannelFactory
public static io.netty.channel.ChannelFactory<? extends io.netty.channel.Channel> getClientChannelFactory()
-
getServerSocketChannelClass
@Deprecated @ScheduledForRemoval public static java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChannelClass()
Deprecated.
-
getServerChannelFactory
public static io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> getServerChannelFactory()
-
threadFactory
public static java.util.concurrent.ThreadFactory threadFactory()
-
toByteArray
@Deprecated @ScheduledForRemoval public static byte[] toByteArray(io.netty.buffer.ByteBuf byteBuf, int size)Deprecated.
-
readByteArray
public static byte[] readByteArray(io.netty.buffer.ByteBuf byteBuf, int size)
-
readVarInt
public static int readVarInt(io.netty.buffer.ByteBuf byteBuf)
-
writeVarInt
public static io.netty.buffer.ByteBuf writeVarInt(io.netty.buffer.ByteBuf byteBuf, int value)
-
readVarLong
public static long readVarLong(io.netty.buffer.ByteBuf byteBuf)
-
writeVarLong
public static io.netty.buffer.ByteBuf writeVarLong(io.netty.buffer.ByteBuf byteBuf, long value)
-
writeString
public static io.netty.buffer.ByteBuf writeString(io.netty.buffer.ByteBuf byteBuf, java.lang.String string)
-
readString
public static java.lang.String readString(io.netty.buffer.ByteBuf byteBuf)
-
getThreadAmount
public static int getThreadAmount()
-
-