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

Examples of net.minecraft.util.io.netty.channel.Channel.pipeline()


          @Override
          public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
                Channel channel = (Channel) msg;

                // Prepare to initialize ths channel
                channel.pipeline().addFirst(beginInitProtocol);
                ctx.fireChannelRead(msg);
          }
        };
  }
 
View Full Code Here


       
        // Channel future that contains the server connection
        Channel serverChannel = ((ChannelFuture)item).channel();
 
        serverChannels.add(serverChannel);
        serverChannel.pipeline().addFirst(serverChannelHandler);
        looking = false;
      }
    }
  }
 
View Full Code Here

              @Override
              public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
                    Channel channel = (Channel) msg;

                    // Prepare to initialize ths channel
                    channel.pipeline().addFirst(beginInitProtocol);
                    ctx.fireChannelRead(msg);
              }
            };
           
            // Get the current NetworkMananger list
View Full Code Here

   
    // For thread safety - see ChannelInjector.close()
    channel.eventLoop().submit(new Callable<Object>() {
      @Override
      public Object call() throws Exception {
        channel.pipeline().remove(handler);
        return null;
      }
    });
  }
 
View Full Code Here

            channel = (Channel) this.getChannelField().get(this.getNetworkManager(player));
        } catch (final Exception e) {
            e.printStackTrace();
            return null;
        }
        return channel.pipeline();
    }

    @Override
    protected void hookPlayer(Player player) {
        final ChannelPipeline pipeline = this.getPipeline(player);
View Full Code Here

    public static void bind(Player player) {
      Object entityPlayer = Conversion.toEntityHandle.convert(player);
      Object playerConnection = EntityPlayerRef.playerConnection.get(entityPlayer);
      Object networkManager = PlayerConnectionRef.networkManager.get(playerConnection);
      Channel channel = NetworkManagerRef.channel.get(networkManager);
      channel.pipeline().addBefore("packet_handler", "bkcommonlib", new CommonChannelListener(player));
    }
   
    public static void unbind(Player player) {
      Object entityPlayer = Conversion.toEntityHandle.convert(player);
      Object playerConnection = EntityPlayerRef.playerConnection.get(entityPlayer);
View Full Code Here

      final Channel channel = NetworkManagerRef.channel.get(networkManager);
      channel.eventLoop().submit(new Callable<Object>() {

        @Override
        public Object call() throws Exception {
          channel.pipeline().remove("bkcommonlib");
          return null;
        }
      });
    }
   
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.