Internet Direct (Indy)
Home
PreviousUpNext
TIdStack.Connect Method

Establishes a connection for the socket handle.

Pascal
procedure Connect(
    const ASocket: TIdStackSocketHandle; 
    const AIP: string; 
    const APort: TIdPort; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
); virtual; abstract;
Parameters 
Description 
ASocket 
Socket handle for the connection.
 
AIP 
IP address for the remote network connection.
 
APort 
Port number for the remote network connection.
 
AIPVersion 
IP address family for the IP address. 

Connect is an abstract virtual procedure that specifies the method used to access the Connect() API for a protocol stack implementation. 

Connect creates a connection to the remote destination specified in AIP and APort using the socket handle in ASocket. 

For stream sockets, an active connection is opened to the remote network using AIP and APort as the destination. For datagram sockets, AIP and APort are used to establish a default destination address but no connection is opened. 

On successfully completion of Connect, the socket handle is ready for sending and receiving data.

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.