TsgcWSPServer_E2EEEvents › OnConnect

OnConnect Event

Fired when a client WebSocket connection is established on the E2EE subprotocol.

Syntax

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

Default Value

Remarks

Invoked once per client after the WebSocket handshake completes and the E2EE subprotocol is negotiated. The Connection argument gives access to the remote identity and can be used to register per-connection state in your application.

Example

procedure TfrmServerE2EE.WSPE2EEConnect(Connection: TsgcWSConnection);
begin
  MemoLog.Lines.Add('connected: ' + Connection.Guid);
end;

Back to Events