Advertisement
forextheblack

Tuto-1

Nov 10th, 2012
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. ServerBootstrap bootstrap = new ServerBootstrap(                
  2.                 new NioServerSocketChannelFactory(              
  3.                 Executors.newCachedThreadPool(),
  4.                 Executors.newCachedThreadPool()));  
  5.          // Set up the pipeline factory.
  6.          bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
  7.              public ChannelPipeline getPipeline() throws Exception {
  8.                 return Channels.pipeline(new ConectionHandler());
  9.              }
  10.          });
  11.  
  12.          // Bind and start to accept incoming connections.
  13.          bootstrap.bind(new InetSocketAddress(mPort));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement