Package game

Examples of game.GameEvent


      @Override
      public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
         Object message = e.getMessage();
         if (message instanceof GameEvent) {
            GameEvent gameEvent = (GameEvent) message;
            ClientWriteThread writeThread = channels.get(gameEvent.getSource());
            if (writeThread == null) {
               synchronized (clients) {
                  for (int i = 0; i < clients.size(); i++) {
                     if (clients.get(i).getChannel() == ctx.getChannel()) {
                        channels.put(gameEvent.getSource(), clients.get(i));
                        clients.remove(i);
                        break;
                     }
                  }
               }
View Full Code Here

TOP

Related Classes of game.GameEvent

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.