TsgcWSPServer_Files › Events › OnConnect
Fired when a client successfully connects to the server.
property OnConnect: TsgcWSConnectEvent;
// TsgcWSConnectEvent = procedure(Connection: TsgcWSConnection) of object
—
Use this event to initialize per-connection state once a WebSocket client has completed the handshake on the hosting server. Connection.Guid uniquely identifies the client and is the value accepted by SendFile and WriteData.
procedure TForm1.oFilesConnect(Connection: TsgcWSConnection);
begin
Memo1.Lines.Add('connected: ' + Connection.Guid);
end;