Package org.drasyl.util
Class NettyUtil
- java.lang.Object
-
- org.drasyl.util.NettyUtil
-
public final class NettyUtil extends Object
Utility class for netty-related operations
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<? extends io.netty.channel.socket.DatagramChannel>
getBestDatagramChannel()
Returns theDatagramChannel
that fits best to the current environment.static io.netty.channel.EventLoopGroup
getBestEventLoopGroup(int nThreads)
Returns theEventLoopGroup
that fits best to the current environment.
-
-
-
Method Detail
-
getBestEventLoopGroup
@NonNull public static io.netty.channel.EventLoopGroup getBestEventLoopGroup(int nThreads)
Returns theEventLoopGroup
that fits best to the current environment. Under Linux the more performantEpollEventLoopGroup
is returned.- Returns:
EventLoopGroup
that fits best to the current environment
-
getBestDatagramChannel
public static Class<? extends io.netty.channel.socket.DatagramChannel> getBestDatagramChannel()
Returns theDatagramChannel
that fits best to the current environment. Under Linux the more performantEpollDatagramChannel
is returned.- Returns:
DatagramChannel
that fits best to the current environment
-
-