Topic Path: Symbol Reference > Classes > TIdHTTPCustomSessionList Class > TIdHTTPCustomSessionList Methods > GetSession Method
TIdHTTPCustomSessionList.GetSession Method

Retrieves a HTTP session from the session list.

function GetSession(
    const SessionID: string; 
    const RemoteIP: string
): TIdHTTPSession; virtual; abstract;
The identifier for the session.
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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.