TsgcWSPServer_PresenceEvents › OnError

OnError Event

Fired when a transport-level error is reported for a connection.

Syntax

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

Default Value

Remarks

Raised on the server whenever a WebSocket or transport error occurs for a Presence connection. Error contains a human-readable description. For Presence-domain errors (member/channel rejection, publish refusal) use OnErrorMemberChannel and OnErrorPublishMsg.

Example

procedure TForm1.sgcWSPServer_Presence1Error(Connection: TsgcWSConnection;
  const Error: string);
begin
  Log('#Error ' + Connection.Guid + ': ' + Error);
end;

Back to Events