コード例 #1
0
  @Override
  public void Heartbeat(int arg0) throws Exception {
    synchronized (this) {
      if (this.userState != GSUserState.Login) {
        logger.warn("drop heartbeat -- user state({}) error", this.userState);
        return;
      }

      int receivedID = binderDataBase.getReceivedSeqID();

      logger.debug("received heartbeat {} local {}", arg0, receivedID);

      if (receivedID < arg0) {

        imServer.pollMessage(this.client.getToken(), receivedID);
      }
    }
  }