Class Networking

java.lang.Object
net.glowstone.net.Networking

public final class Networking extends Object
  • 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

      public static Class<? extends io.netty.channel.socket.SocketChannel> 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

      public static Class<? extends io.netty.channel.socket.DatagramChannel> 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