Internet Direct (Indy)
Home
PreviousUpNext
TIdTCPConnection.CheckForGracefulDisconnect Method

Determines if the peer has been gracefully disconnected.

Pascal
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. 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.