TsgcWebSocketHTTPServer속성 › AutoStartSession

AutoStartSession Property

세션 상태가 활성화된 경우 들어오는 모든 요청에 대해 자동으로 새 HTTP 세션을 생성합니다.

구문

property AutoStartSession: Boolean read GetAutoStartSession write SetAutoStartSession;

기본값

False

설명

SessionStateAutoStartSession이 모두 True이면, HTTP 서버는 유효한 세션 쿠키가 없는 요청을 처음 볼 때 새 TIdHTTPSession을 할당하고(OnSessionStart를 발생시킴) 따라서 서버 코드가 명시적으로 CreateSession()을 호출할 필요가 없습니다. 핸들러 코드에서 세션을 생성할지 요청을 거부할지 결정하려면 이를 False로 두십시오. 이 속성은 SessionStateFalse일 때는 효과가 없습니다.

예제


oServer := TsgcWebSocketHTTPServer.Create(nil);
oServer.SessionState := true;
oServer.AutoStartSession := true;
oServer.SessionTimeOut := 600000;
oServer.Active := true;

속성으로 돌아가기