TsgcWSPClient_FilesEvents › OnError

OnError Event

Fires for transport-level errors reported by the underlying sgcWebSocket client.

Syntax

property OnError: TsgcWSErrorEvent;
// TsgcWSErrorEvent = procedure(Connection: TsgcWSConnection; const Error: string) of object

Default Value

Remarks

Use this event to surface protocol errors (malformed frames, rejected messages) to the UI or log. File-specific failures are also routed through OnFileReceivedError and OnFileSentError with extra context.

Example

procedure TForm1.oProtocolError(Connection: TsgcWSConnection; const Error: string);
begin
  Memo1.Lines.Add('error: ' + Error);
end;

Back to Events