TsgcWSPServer_Presence › Events › OnConnect
Fired when a client completes the WebSocket handshake for the Presence protocol.
property OnConnect: TsgcWSConnectEvent;
// TsgcWSConnectEvent = procedure(Connection: TsgcWSConnection) of object
—
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.
procedure TForm1.sgcWSPServer_Presence1Connect(Connection: TsgcWSConnection);
begin
Log('Presence client connected: ' + Connection.Guid);
end;