Topic Path: Symbol Reference > Classes > TIdTelnet Class > TIdTelnet Methods > Connect Method
ContentsIndexHome
PreviousUpNext
TIdTelnet.Connect Method

Connects the TELNET client to a remote host.

procedure Connect; override;

Connect is an overridden procedure in TIdTelnet used to connect the TELNET client to a remote host computer identified by the Host and Port properties. 

Connect calls the inherited method to open the socket connection for the client, and creates the TIdTelnetReadThread instance used to read data from the socket connection. If the client is successfully connected, the TelnetThread property is initialized. 

If an error occurs when opening the socket connection and/or instantiating the TelnetThread, the connection is closed and an exception is raised. The connection is closed by calling Disconnect using the immediate disconnection argument. The exception raised is a EIdTelnetClientConnectError class instance with the message RSNoCreateListeningThread

Use Disconnect to close the TELNET client.

Exceptions 
Description 
Raised when an error occurs when connectiong to the remote host. 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.