Package org.apache.mina.transport.socket.nio

Examples of org.apache.mina.transport.socket.nio.SocketAcceptor.unbindAll()


    ((SocketSessionConfig) config.getSessionConfig()).setReuseAddress(true);
    acceptor.bind(new InetSocketAddress(ip, port), handler, config);
    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
      public void run() {
        acceptor.unbindAll();
      }
    });
    return acceptor;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.