Topic Path: Symbol Reference > Classes > TIdContext Class > TIdContext Properties > Connection Property
ContentsIndexHome
PreviousUpNext
TIdContext.Connection Property

Represents the peer connection for a client session on the TCP server.

property Connection: TIdTCPConnection;

Connection is a read-only TIdTCPConnection property that represents the peer connection for a client session running on the TCP server. 

Connection is initialized in Create using the argument value passed to the constructor. 

Connection is freed in the Destroy method. 

Connection can be used in the OnBeforeRun, OnRun, and OnAfterRun event handler procedures to access properties and methods for the TIdTCPConnection instance. Of special importance are the IOHandler property and the Disconnect method for the connection. 

The TIdTCPConnection instance passed to the constructor is created by a listener thread that detect connection requests for the server.

TIdTCPConnection 

TIdTCPServer.OnConnect 

TIdTCPServer.OnDisconnect 

TIdTCPServer.OnExecute

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