TsgcWebSocketHTTPServer › Properties › SessionState
Enables cookie-based HTTP session tracking on top of the stateless HTTP protocol.
public bool SessionState { get; set; }
False
Set SessionState to True to allow the HTTP server to assign a session id to each client and maintain per-user state in the SessionList collection. The OnSessionStart, OnSessionEnd, OnCreateSession and OnInvalidSession events provide the hook points for implementing login flows. Tune SessionTimeOut to control idle expiration, and combine with AutoStartSession to create sessions automatically on first request. See the HTTP Server Sessions topic for a full walkthrough.
oServer = new TsgcWebSocketHTTPServer();
oServer.SessionState = true;
oServer.AutoStartSession = true;
oServer.Active = true;