List of usage examples for io.netty.channel.socket ServerSocketChannel closeFuture
ChannelFuture closeFuture();
From source file:com.google.devtools.build.lib.remote.blobstore.http.HttpBlobStoreTest.java
License:Open Source License
private void closeServerChannel(ServerSocketChannel server) throws InterruptedException { if (server != null) { server.close();// w w w . j av a 2 s. c o m server.closeFuture().sync(); server.eventLoop().shutdownGracefully().sync(); } }
From source file:cyril.server.io.LessThanNullSuite.java
License:Open Source License
public static final void runStandalone(NorthernerServer ns) { try {/*from w w w .ja va2s. c o m*/ ServerSocketChannel ch = (ServerSocketChannel) ns.channelFuture.sync().channel(); System.out.println("Using channel " + ch + " (" + ch.getClass().getSimpleName() + ")"); ch.closeFuture().sync(); System.out.println("Has closed?!"); } catch (InterruptedException e) { throw new ChannelException(e); } finally { System.out.println("Shutting down..."); ns.bootstrap.shutdown(); } }