Exemplo n.º 1
0
 /**
  * Invoked whenever a packet is ready to be added to the queue.
  *
  * @param session The IO session on which the packet was received
  * @param message The packet
  */
 public void messageReceived(IoSession session, Object message) {
   if (session.isClosing()) {
     return;
   }
   LSPacket p = (LSPacket) message;
   connector.getPacketQueue().add(p);
 }
Exemplo n.º 2
0
  public void messageReceived(IoSession session, Object message) {
    Player player = (Player) session.getAttachment();
    if (session.isClosing() || player.destroyed()) {
      return;
    }
    RSCPacket p = (RSCPacket) message;

    if (p.getID() == 55) player.addInterval();

    Instance.loggingService().tell(p, ActorRef.noSender());

    packets.add(p);
  }