TsgcWSPClient_MQTT › イベント › OnMQTTPubRel
PUBRELが受信されたときに、QoS 2ハンドシェイクの3番目のレグで発生します。
property OnMQTTPubRel: TsgcWSMQTTPubRelEvent;
// TsgcWSMQTTPubRelEvent = procedure(Connection: TsgcWSConnection; aPacketIdentifier: Word; ReasonCode: Integer; const ReasonName: String; PubRelProperties: TsgcWSMQTTPUBRELProperties) of object
—
QoS 2 交換の 3 番目のレッグ(PUBLISH → PUBREC → PUBREL → PUBCOMP)。このイベントは、ブローカーがこのクライアントへメッセージを配信する正確に一度のフローの一部として PUBREL パケットを受信したときに発生します。コンポーネントは自動的に PUBCOMP で応答してハンドシェイクを完了します。パラメータ:
このイベントは主にロギング/診断に使用します。アプリケーションのアクションは必要ありません。
procedure TForm1.MQTTPubRel(Connection: TsgcWSConnection;
aPacketIdentifier: Word; ReasonCode: Integer;
const ReasonName: String;
PubRelProperties: TsgcWSMQTTPUBRELProperties);
begin
Memo1.Lines.Add(Format('PUBREL id=%d code=%d',
[aPacketIdentifier, ReasonCode]));
end;