TsgcHTTPServer › 속성 › SessionState
상태 비저장 HTTP 프로토콜 위에서 쿠키 기반 HTTP 세션 추적을 활성화합니다.
property SessionState: Boolean read GetSessionState write SetSessionState;
False
HTTP 서버가 각 클라이언트에게 세션 ID를 할당하고 SessionList 컬렉션에서 사용자별 상태를 유지하도록 하려면 SessionState를 True로 설정하십시오. OnSessionStart, OnSessionEnd, OnCreateSession, OnInvalidSession 이벤트는 로그인 흐름을 구현하기 위한 훅 지점을 제공합니다. 유휴 만료를 제어하려면 SessionTimeOut을 조정하고, 최초 요청 시 세션을 자동으로 생성하려면 AutoStartSession과 함께 사용하십시오. 전체 안내는 HTTP Server Sessions 항목을 참조하십시오.
oServer := TsgcHTTPServer.Create(nil);
oServer.SessionState := true;
oServer.AutoStartSession := true;
oServer.Active := true;