Topic Path: Symbol Reference > Classes > TIdHTTPDefaultSessionList Class > TIdHTTPDefaultSessionList Methods > CreateSession Method
TIdHTTPDefaultSessionList.CreateSession Method

Adds a new HTTP session to the thread-safe container.

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

TIdHTTPSession - The session object reference.

CreateSession is an overridden TIdHTTPSession function used to create a new persistent HTTP session, and add the new session to the internal storage for the session list. 

CreateSession constructs a new TIdHTTPSession instance using the values specified in RemoteIP and SessionID. 

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

SessionID is the identifier for the new HTTP session. 

CreateSession is used by TIdHTTPServer to retrieve a new HTTP session when a new client connection is established. 

Use CreateUniqueSession to ensure that a previous persistent session is used for a new client connection to a HTTP server implementation.

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