TsgcWebSocketHTTPServer › Events › OnSessionStart
Fires when an HTTP session is started and added to the SessionList.
public event {$IFDEF INDY10_5_7} TIdHTTPSessionStartEvent {$ELSE} TOnSessionStartEvent {$ENDIF}Handler OnSessionStart;
// delegate void {$IFDEF INDY10_5_7} TIdHTTPSessionStartEvent {$ELSE} TOnSessionStartEvent {$ENDIF}Handler(TObject Sender)
—
OnSessionStart is raised after a new HTTP session has been added to the SessionList, either automatically when AutoStartSession is True or explicitly by calling SessionList.CreateSession from OnCommandGet. Use it to initialize per-session data structures, emit an audit trail, or warm caches for the new user. The event signature depends on the underlying Indy version (INDY10_5_7 conditional); recent Indy builds expose the TIdHTTPSession instance via Sender. This event only fires when SessionState is True.