Internet Direct (Indy)
Home
PreviousUpNext
TIdTelnet.Disconnect Method

Disconnects the client from the host.

Pascal
procedure Disconnect(
    ANotifyPeer: Boolean
); override;
Parameters 
Description 
AImmediate 
Indicates the socket should be immediately disconnected. 

Disconnect is an overridden procedure in TIdTelnet that instructs the TelnetThread to terminate, and calls the inherited Disconnect method. 

AImmediate indicates if the socket should be immediately disconnected in the inherited method. 

When TelnetThread has been assigned, the thread is terminated. 

Disconnect triggers the OnDisconnect event handler, and waits for the TelnetThread to complete. Resources allocated to TelnetThread are freed prior to exiting from the method. 

Use Connect to establish the connection for the TELNET client and to create the TIdTelnetReadThread for the TelnetThread property.

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.