Connected

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloConnection > TApolloConnection Methods >

Connected

Declaration

function Connected: Boolean;

Description

Returns the most recent connected status, but does not retest the connection. For example, if the connection was made (by setting Active to True) this would return True. Later, if the connection were lost, this would still return True. The Ping method should be used in cases where it is critical to verify the connection is still live. However, this check is much quicker than calling Ping for general purpose usage.

Delphi Example

if ApolloConnection1.Connected then

 ShowMessage( 'Connection OK' ) 

else

 ShowMessage( 'Connection FAILED' ); 

See Also

ActiveTApolloConnection_Active, ConnectConnect, DisconnectDisconnect, PingPing