List of usage examples for io.netty.bootstrap ServerBootstrap childAttr
public <T> ServerBootstrap childAttr(AttributeKey<T> childKey, T value)
From source file:gwlpr.loginshard.LoginShardFactory.java
License:Open Source License
@Override public Channel getServerChannel(ServerBootstrap bootstrap) throws InterruptedException { // set the attributes for new channels bootstrap.childAttr(ClientBean.HANDLE_KEY, null); // create the pipeline-factory bootstrap.childHandler(new LoginShardChannelInitializer(EncryptionOptions.Enable)); // finally, bind and sync return bootstrap.bind(8112).sync().channel(); }
From source file:gwlpr.mapshard.MapShardFactory.java
License:Open Source License
@Override public Channel getServerChannel(ServerBootstrap bootstrap) throws InterruptedException { // set the attributes for new channels bootstrap.childAttr(ClientBean.HANDLE_KEY, null); // create the pipeline-factory bootstrap.childHandler(new MapShardChannelInitializer(EncryptionOptions.Enable)); // finally, bind and sync return bootstrap.bind(9112).sync().channel(); }