TsgcWSPClient_E2EEEvents › OnConnect

OnConnect Event

Fired when the underlying WebSocket connection is established.

Syntax

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

Default Value

Remarks

Forwarded from the underlying TsgcWebSocketClient after the WebSocket handshake completes successfully. Use it to initialise user state (for example to call JoinGroup for the groups this user belongs to) now that the transport is ready.

Example

procedure TForm1.oE2EEConnect(Connection: TsgcWSConnection);
begin
  oE2EE.JoinGroup('TEAM01');
end;

Back to Events