TsgcWSPClient_WAMPEvents › OnCallResult

OnCallResult Event

Fires once per successful RPC to deliver the final result of a Call invocation.

Syntax

property OnCallResult: TsgcWSCallResultEvent;
// TsgcWSCallResultEvent = procedure(Connection: TsgcWSConnection; CallId, Result: string) of object

Default Value

Remarks

Delivered in response to a WAMP CALLRESULT frame (type id 3). CallId matches the id passed to Call, allowing the handler to pair the result with the original request. Result carries the remote procedure's return value as a JSON-encoded string; parse it with TsgcJSON or any JSON library. Every successful RPC fires this event exactly once — it will not be preceded by OnCallProgressResult unless the server opted into progressive delivery.

Example


procedure TForm1.WAMPCallResult(Connection: TsgcWSConnection;
  CallId, Result: string);
begin
  Memo1.Lines.Add(Format('call %s returned %s', [CallId, Result]));
end;

Back to Events