TsgcWSPClient_PresenceEvents › OnConnect

OnConnect Event

Fires when the underlying WebSocket transport has connected to the server.

Syntax

property OnConnect: TsgcWSConnectEvent;
// TsgcWSConnectEvent = procedure(Connection: TsgcWSConnection) of object

Default Value

Remarks

Fires after the WebSocket handshake has completed successfully. The Presence session is not yet established at this point; wait for OnSession before calling Subscribe, Publish or Invite on the channel-aware API.

Example

procedure TForm1.oPresenceConnect(Connection: TsgcWSConnection);
begin
  Memo1.Lines.Add('Connected: ' + Connection.Guid);
end;

Back to Events