Class NioServer

java.lang.Object
me.tamkungz.nilkit.network.NioServer
All Implemented Interfaces:
Runnable

public final class NioServer extends Object implements Runnable
  • Constructor Details

  • Method Details

    • start

      public void start() throws IOException
      Throws:
      IOException
    • stop

      public void stop()
    • isRunning

      public boolean isRunning()
    • getConnectionCount

      public int getConnectionCount()
    • getConnections

      public List<Connection> getConnections()
    • getBoundPort

      public int getBoundPort()
      Returns the actual bound port. Useful when the server was created with port 0.
    • send

      public void send(Connection connection, Packet packet)
    • broadcast

      public void broadcast(Packet packet)
    • run

      public void run()
      Specified by:
      run in interface Runnable