Topic Path: Symbol Reference > Classes > TIdTCPClientCustom Class > TIdTCPClientCustom Methods > Connect Method > Connect Method (string)
TIdTCPClientCustom.Connect Method (string)

Opens the client connection and sets the IOHandler.

procedure Connect(
    const AHost: string
); overload;
Remote IP address or host name for the connection 

Connect is an overloaded method used to open the connection using the IOHandler for the client. Connect assigns the value in AHost to the Host property for the client, and calls an overloaded version of the method to establish the Socket connection. 

Use Disconnect to close the client connection. 

Use ConnectAndGetAll to open a connection, read available data, and close the connection in a single method call.

Exception raised when the IOHandler for the connection is already connected to the peer.
Raised when the remote Host for the connection contains a blank value.
Raised when the remote Port number for the connection contains 0 (zero). 
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.