Topic Path: Symbol Reference > Classes > TIdContext Class > TIdContext Methods > Create Constructor
ContentsIndexHome
PreviousUpNext
TIdContext.Create Constructor
constructor Create(
    AConnection: TIdTCPConnection; 
    AYarn: TIdYarn; 
    AList: TIdThreadList = nil
); virtual; reintroduce;
Parameters 
Description 
AConnection 
Peer connection for the client.
 
AYarn 
Thread or fiber for execution the client connections task.
 
AList 
List of session contexts that owns the new session context. 

Create is the reintroduced constructor for the client session context. 

AConnection is the peer connection for the client session created in a listener thread for the server. 

AYarn is the thread or fiber to use when executing the task for the client connection created in a listener thread for the server. 

AList is the list of session contexts that exist in the server, and owns the new session context. 

Create calls the inherited constructor using AYarn as the owner of the task. Create stores the value in AConnection in the Connection property. The value in AList is stored in a private member used for the other session contexts that exist in the server. When AList contains a valid non-null instance, the new session context from the constructor is added to the internal list of session contexts. 

Use Destroy to free the session context.

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