TsgcWSPClient_sgcEvents › OnAcknowledgment

OnAcknowledgment Event

Fires when the server acknowledges receipt of a QoS 1 or 2 message.

Syntax

property OnAcknowledgment: TsgcWSAcknowledgment;
// TsgcWSAcknowledgment = procedure(Connection: TsgcWSConnection; const Id: string) of object

Default Value

Remarks

When QoS.Level is qosLevel1 or qosLevel2, Publish, RPC and Notify attach an Id to each message and keep it in an internal list until the server returns the acknowledgment. When the acknowledgment arrives the Id is removed from the queue and this event is raised.

Example

procedure TForm1.oProtocolAcknowledgment(Connection: TsgcWSConnection; const Id: string);
begin
  Memo1.Lines.Add('ack: ' + Id);
end;

Back to Events