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

Determines if the peer has been gracefully disconnected.

procedure CheckForGracefulDisconnect(
    ARaiseExceptionIfDisconnected: Boolean = True
); virtual;
Parameters 
Description 
ARaiseExceptionIfDisconnected 
Indicates if an exception is raised when the connection is closed. 

CheckForGracefulDisconnect is a procedure used to determine if the peer connection has been closed gracefully. 

CheckForGracefulDisconnect uses the IOHandler (when assigned) to check for a valid bound socket handle for the connection. An EIdException with the message RSNotConnected is raised when the IOHandler has not been assigned for the connection and ARaiseExceptionIfDisconnected contains True. 

Use one the TIdTCPConnection descendents to access a Connect method specific to a given protocol or connection type.

Exceptions 
Description 
Raised with the message RSNotConnected if an IOHandler is not assigned for the connection. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.