RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomSessionsService.ConnectActive Method

Obtains the interface for an active Web session, given its Session ID.

Pascal
function ConnectActive(AID: TSessionID): IWebSession;
C++
__fastcall IWebSession ConnectActive(TSessionID AID);

Call ConnectActive to access the session that has a specified Session ID. Unlike the Connect method, ConnectActive never returns a session that has expired or been terminated. 

AID is the session ID of the session to locate. 

ConnectActive returns the IWebSession interface for the located session. This interface has a single method, Terminate, which lets you terminate the session. If the sessions service does not have an active session with the specified session ID, ConnectActive returns nil (Delphi) or NULL (C++).

Note: Calling ConnectActive counts as accessing a session. That is, if you call ConnectActive for any session, the session will not time out until the entire time-out period elapses after the call to ConnectActive.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!