My server, that I'm using, runs off Mina networking, and is pretty inefficient when accepting connections. How would I improve the networking?
How could I improve this?
Here's the main void.
@Override public void run() { /** * Starting Up Server */ System.setOut(new Logger1(System.out)); System.setErr(new Logger1(System.err)); log.log(Level.INFO, "Launching Deathzscape the Project Insanity base"); /** * Accepting Connections */ acceptor = new SocketAcceptor(); connectionHandler = new ConnectionHandler(); SocketAcceptorConfig sac = new SocketAcceptorConfig(); sac.getSessionConfig().setTcpNoDelay(false); sac.setReuseAddress(true); sac.setBacklog(100); throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY); sac.getFilterChain().addFirst("throttleFilter", throttleFilter); try { acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac); } catch (IOException e) { e.printStackTrace(); } /** * Server Successfully Loaded */ log.log(Level.INFO, "Server listening on port 0.0.0.0:" + serverlistenerPort); /** * Main Server Tick */ try { do { //process code was here } while (!Server.shutdownServer); } catch (Exception ex) { ex.printStackTrace(); log.log(Level.SEVERE, "A fatal exception has been thrown!"); } acceptor = null; connectionHandler = null; sac = null; System.exit(0); }