Topic Path: Symbol Reference > Classes > TIdStackLinux Class > TIdStackLinux Methods > Connect Method
TIdStackLinux.Connect Method

Establishes a connection for the socket handle.

procedure Connect(
    const ASocket: TIdStackSocketHandle; 
    const AIP: string; 
    const APort: TIdPort; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
); override;
Socket handle for the connection.
IP address for the remote network connection.
Port number for the remote network connection.
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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.