TsgcWSPClient_PresenceEvents › OnDisconnect

OnDisconnect Event

Fires after the WebSocket transport has been disconnected.

Syntax

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

Default Value

Remarks

Fires after the connection is closed, with the WebSocket close Code reported by the peer or local side. The Presence client also clears its member bookkeeping so subsequent connects start from a clean state.

Example

procedure TForm1.oPresenceDisconnect(Connection: TsgcWSConnection; Code: Integer);
begin
  Memo1.Lines.Add('Disconnected: ' + IntToStr(Code));
end;

Back to Events