Topic Path: Symbol Reference > Classes > TIdTCPConnection Class > TIdTCPConnection Methods > Connected Method
ContentsIndexHome
PreviousUpNext
TIdTCPConnection.Connected Method

Indicates if the peer connection has been opened.

function Connected: Boolean; virtual;

Boolean - True when the connection has been opened.

Connected is a Boolean function used to indicate when the connection to the peer has been opened and activated. 

Connected returns True when the connection contains a valid IOHandler with a bound socket handle for the connection, and the connection has not been closed unexpectedly. 

Socket connections are a virtual circuit that exist only for the duration of a given operation. Connected will reflect the connection state based on the condition of the local socket descriptor, and the result of the most recent operation using the local socket descriptor. Connected cannot guarantee that a subsequent operation on the connection will not fail. 

CheckForDisconnect 

TIdIOHandler 

TIdIOHandlerSocket

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