Internet Direct (Indy) Version 9.0.1 Beta
TIdTCPConnection.Disconnect
Disconnects the peer connection.

procedure Disconnect; virtual;
Description
Disconnect is used to disconnect from the current peer connection. Many descendant components override this method to provide termination commands required by various protocols. If you simply need to close a connection, you probably should call the DisconnectSocket method.

Disconnect triggers a hsDisconnecting status notification message prior to calling DisconnectSocket. When needed, Disconnect also frees the IOHandler. Finally, Disconnect triggers the OnDisconnected event handler and a hsDisconnected status notification message.