TsgcWSPClient_E2EEEvents › OnDisconnect

OnDisconnect Event

Fired when the underlying WebSocket connection is closed.

Syntax

property OnDisconnect: TsgcWSDisconnectEvent;
// TsgcWSDisconnectEvent = procedure(Connection: TsgcWSConnection; Code: Integer) of object

Default Value

Remarks

Forwarded from the underlying TsgcWebSocketClient. The Code argument carries the WebSocket close code reported by the peer. While disconnected, no direct or group messages can be sent or received; pending acknowledgments are dropped.

Example

procedure TForm1.oE2EEDisconnect(Connection: TsgcWSConnection; Code: Integer);
begin
  Log('E2EE disconnected, code=' + IntToStr(Code));
end;

Back to Events