TsgcWSPServer_PresenceEvents › OnConnect

OnConnect Event

Fired when a client completes the WebSocket handshake for the Presence protocol.

Syntax

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

Default Value

Remarks

Fires on the server once a new client connection has been accepted and has negotiated the Presence subprotocol. At this point the client has not yet sent member data; use OnBeforeNewMember or OnNewMember to react to the join handshake.

Example

procedure TForm1.sgcWSPServer_Presence1Connect(Connection: TsgcWSConnection);
begin
  Log('Presence client connected: ' + Connection.Guid);
end;

Back to Events