/**
   * 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");
  }
  /**
   * 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");
    }
  }