Package net.glowstone.net
Class Networking
java.lang.Object
net.glowstone.net.Networking
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final boolean
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<? extends io.netty.channel.socket.DatagramChannel>
Gets the "best" datagram channel available.static Class<? extends io.netty.channel.socket.ServerSocketChannel>
Gets the "best" server socket channel available.static Class<? extends io.netty.channel.socket.SocketChannel>
Gets the "best" socket channel available.static io.netty.channel.EventLoopGroup
Creates the "best" event loop group available.
-
Field Details
-
EPOLL_AVAILABLE
public static final boolean EPOLL_AVAILABLE -
KQUEUE_AVAILABLE
public static final boolean KQUEUE_AVAILABLE
-
-
Method Details
-
createBestEventLoopGroup
public static io.netty.channel.EventLoopGroup createBestEventLoopGroup()Creates the "best" event loop group available.Epoll and KQueue are favoured and will be returned if available, followed by NIO.
- Returns:
- the "best" event loop group available
-
bestServerSocketChannel
public static Class<? extends io.netty.channel.socket.ServerSocketChannel> bestServerSocketChannel()Gets the "best" server socket channel available.Epoll and KQueue are favoured and will be returned if available, followed by NIO.
- Returns:
- the "best" server socket channel available
-
bestSocketChannel
Gets the "best" socket channel available.Epoll and KQueue are favoured and will be returned if available, followed by NIO.
- Returns:
- the "best" socket channel available
-
bestDatagramChannel
Gets the "best" datagram channel available.Epoll and KQueue are favoured and will be returned if available, followed by NIO.
- Returns:
- the "best" datagram channel available
-