TsgcWSPClient_sgc › Events › OnRPCResult
Fires when the server returns a successful RPC response.
property OnRPCResult: TsgcWSRPCResultEvent;
// TsgcWSRPCResultEvent = procedure(Connection: TsgcWSConnection; Id, Result: string) of object
—
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.
procedure TForm1.oProtocolRPCResult(Connection: TsgcWSConnection; Id, Result: string);
begin
Memo1.Lines.Add(Format('rpc %s ok: %s', [Id, Result]));
end;