Package net.minecraft.util.io.netty.channel

Examples of net.minecraft.util.io.netty.channel.ChannelInboundHandler


                e.printStackTrace();
              }
            }
           
            // Handle connected channels
            final ChannelInboundHandler endInitProtocol = new ChannelInitializer<Channel>() {
                @Override
                protected void initChannel(Channel channel) throws Exception {
                  try {
                      // This can take a while, so we need to stop the main thread from interfering
                      synchronized (networkManagers) {
                        injectionFactory.fromChannel(channel, NettyProtocolInjector.this, playerFactory).inject();
            }
                  } catch (Exception e) {
                    reporter.reportDetailed(NettyProtocolInjector.this, Report.newBuilder(REPORT_CANNOT_INJECT_INCOMING_CHANNEL).
                        messageParam(channel).error(e));
                  }
                }
            };
           
            // This is executed before Minecraft's channel handler
            final ChannelInboundHandler beginInitProtocol = new ChannelInitializer<Channel>() {
              @Override
              protected void initChannel(Channel channel) throws Exception {
                // Our only job is to add init protocol
                channel.pipeline().addLast(endInitProtocol);
              }
View Full Code Here

TOP

Related Classes of net.minecraft.util.io.netty.channel.ChannelInboundHandler

Copyright © 2018 www.massapicom. 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.