Internet Direct (Indy)
Home
PreviousUpNext
TIdTCPClientCustom.Connect Method (string, Integer)

Opens the client connection and sets the IOHandler.

Pascal
procedure Connect(
    const AHost: string; 
    const APort: Integer
); overload;
Parameters 
Description 
AHost 
Host address to use for the connection.
 
APort 
Port number to use for the connection. Default is -1. 

Connect is an overloaded procedure used to open the connection using the IOHandler for the client. 

AHost indicates the Host address to use for the connection. When AHost contains an non-blank string, the argument value is used in the Host property. 

APort indicates the Port number to use for the connection. The default value is -1, and indicates that the value in the Port property should be used. When APort contains a value other than -1, the argument value is used in the Port property. 

Connect calls the overloaded Connect method to establish the connection and IOHandler for the custom client. 

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.

Connect 

ConnectAndGetAll 

Disconnect 

Host 

Port 

EIdAlreadyConnected

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.