TsgcWSPClient_DatasetEvents › OnRPCResult

OnRPCResult Event

Fires when the server returns a successful RPC response.

Syntax

property OnRPCResult: TsgcWSRPCResultEvent;
// TsgcWSRPCResultEvent = procedure(Connection: TsgcWSConnection; Id, Result: string) of object

Default Value

Remarks

Id matches the value that was passed to RPC (or the Guid generated by the component when Id was empty). Result carries the server payload. Use GetRPCMethodById and GetRPCParamsById to retrieve the original request values inside the handler.

Example

procedure TForm1.oProtocolRPCResult(Connection: TsgcWSConnection; Id, Result: string);
begin
  Memo1.Lines.Add(Format('rpc %s ok: %s', [Id, Result]));
end;

Back to Events