RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomSessionsService.Connect Method

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

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

Call Connect to access the session that has a specified Session ID. Unlike the ConnectActive method, Connect may return a session that has expired or been terminated but that has not yet been freed from memory. 

AID is the session ID of the session to locate. 

Connect 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 a session with the specified session ID, Connect returns nil (Delphi) or NULL (C++).

Note: Calling Connect does not count as accessing a session. That is, if you call Connect for any session, it does not affect the time when that session times out.
 

 

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