Topic Path: Symbol Reference > Classes > TIdHTTPCustomSessionList Class > TIdHTTPCustomSessionList Methods > CreateSession Method
ContentsIndexHome
PreviousUpNext
TIdHTTPCustomSessionList.CreateSession Method

Specifies the mechanism used to create a new HTTP session.

function CreateSession(
    const RemoteIP: String; 
    const SessionID: String
): TIdHTTPSession; virtual; abstract;
Parameters 
Description 
RemoteIP 
The peer IP address for the session.
 
SessionID 
The identifier for the session. 

TIdHTTPSession - The session object created.

CreateSession is an abstract virtual TIdHTTPSession function that specifies the mechanism used to create a new HTTP session, and add the new session to the session list. 

RemoteIP is the IP address of the remote computer system that is the endpoint for the HTTP session. 

SessionID is the session identifier for the new HTTP session. 

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 used for the session list. 

Use CreateUniqueSession to ensure only one instance of a session exists when using state-persistent session in an HTTP server.

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