Package io.netty.channel.group

Examples of io.netty.channel.group.ChannelGroup


      // TODO: SSL (with certificates) for RMI
      // TODO: also add an option to disable SSL, because listening on an interface which is NOT available to the public could also work
      // (intranet IP...) :)
     
      ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
     
      final InboundPacketHandler<GameServerSession> inboundPacketHandler = new InboundPacketHandler<GameServerSession>(channels, packetHandlers, SessionKey.SESSION_KEY, actionQueue);
     
      LogBlackList logBlackList = gameServerConfiguration.getLogBlackList();
      if(gameServerConfiguration.getLogBlackList() != null) { // don't log some inbound and outbound packets
View Full Code Here


  }

  @Override
  public void handlePacket(ChannelHandlerContext ctx, P093_ChatMessage packet, GameServerSession serverData, List<QueueAction> actions) throws Exception {
    CharacterData character = serverData.getCurrentCharacter();
    ChannelGroup allChannels = ctx.attr(AllChannelsKey.ALL_CHANNELS_KEY).get();
    actions.add(new ChatMessageAction(character, packet.getMessage(), allChannels));
  }
View Full Code Here

    updateAvailableSkills.setSkillsBitField(new long[] {});
    ctx.write(updateAvailableSkills);

    MapData map = serverData.getMap();
   
    ChannelGroup allChannels = ctx.attr(AllChannelsKey.ALL_CHANNELS_KEY).get();

    // spawn this player on the map (for all players!)
    actions.add(new SpawnPlayerAction(ctx.channel(), allChannels));
  }
View Full Code Here

      Binding bindingConfiguration = loginServerConfiguration.getBinding();
      String bindingIp = bindingConfiguration.getIp();
      int bindingPort = bindingConfiguration.getPort();
     
      ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
     
      final InboundPacketHandler<LoginServerSession> inboundPacketHandler = new InboundPacketHandler<LoginServerSession>(channels, packetHandlers, SessionKey.SESSSION_KEY);
     
      LogBlackList logBlackList = loginServerConfiguration.getLogBlackList();
      if(loginServerConfiguration.getLogBlackList() != null) { // don't log some inbound and outbound packets
View Full Code Here

    }

    private static void runTest(ThreadPerChannelEventLoopGroup loopGroup) throws InterruptedException {
        int taskCount = 100;
        EventExecutor testExecutor = new TestEventExecutor();
        ChannelGroup channelGroup = new DefaultChannelGroup(testExecutor);
        while (taskCount-- > 0) {
            Channel channel = new EmbeddedChannel(NOOP_HANDLER);
            loopGroup.register(channel, new DefaultChannelPromise(channel, testExecutor));
            channelGroup.add(channel);
        }
        channelGroup.close().sync();
        loopGroup.shutdownGracefully(100, 200, TimeUnit.MILLISECONDS).sync();
        assertTrue(loopGroup.isTerminated());
    }
View Full Code Here

TOP

Related Classes of io.netty.channel.group.ChannelGroup

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.