Ejemplo n.º 1
0
  /**
   * Handles the QUITSERVICE management message. Handling means interpreting the payload and setting
   * corresponding internal flags. Introduced in protocol Version 0.0.13
   *
   * <p>Fields are: no fields
   */
  public ManagementMessageKThxBye(byte[] payload) {

    message = payload;

    quitOk = Util.stuffBytesIntoUInt(Util.getFirstBytes(payload, 2));

    log.debug("Decoding QUITSERVICE confirmation message");
  }
Ejemplo n.º 2
0
  /**
   * Handles the QUITSERVICE management message. Handling means interpreting the payload and setting
   * corresponding internal flags. Introduced in protocol Version 0.0.13
   *
   * <p>Fields are: no fields
   */
  public ManagementMessageKThxBye(final short quitOk) {

    ArrayList<byte[]> b = new ArrayList<byte[]>();

    byte[] messagetype = Util.stuffIntIntoShort(ManagementMessage.KTHXBYE);

    b.add(messagetype);
    b.add(Util.stuffIntIntoShort(quitOk));

    this.message = craftMessage(b);

    if (log.isDebugEnabled()) {
      log.debug("Encoding QUITSERVICE confirmation message");
    }
  }