TsgcWSPClient_WAMPEvents › OnCallProgressResult

OnCallProgressResult Event

Fires for each interim chunk of a streaming RPC before the final result arrives via OnCallResult.

Syntax

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

Default Value

Remarks

WAMP v1 RPC supports progressive results: a server-side procedure may emit any number of intermediate CALL_PROGRESS_RESULT frames (extension on type id 3) before finalising the call. CallId matches the identifier supplied to Call, and Result carries the JSON-encoded partial payload. The client must still wait for OnCallResult (success) or OnCallError (failure) to know the call has finished. Use this event to drive progress bars, streaming downloads or long-running report generation.

Example


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

Back to Events