Internet Direct (Indy)
Home
PreviousUpNext
TIdHTTPCustomSessionList.GetSession Method

Retrieves a HTTP session from the session list.

Pascal
function GetSession(
    const SessionID: string; 
    const RemoteIP: string
): TIdHTTPSession; virtual; abstract;
Parameters 
Description 
SessionID 
The identifier for the session.
 
RemoteIP 
The remote IP address for the session. 

TIdHTTPSession - The session object reference, or Nil.

GetSession is an abstract virtual TIdHTTPSessionList function that specifies the mechanism used to retrieve an existing HTTP session from the session list. 

SessionID is the session identifier for the HTTP session to be located in the session list. 

RemoteIP is the IP address for the remote endpoint of the HTTP session. Use a empty string ('') to indicate that any IP address having the requested session identifier is a valid session. 

GetSession should implement some mechanism to prevent a session from becoming stale, and being removed by PurgeStaleSessions, when it has been accessed using GetSession. 

All methods in TIdHTTPCustomSessionList are declared as virtual abstract procedures and functions, and must be overridden in a descendant class to provide access to the storage mechanism in the session list.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.