Topic Path: Symbol Reference > Classes > TIdStackWindows Class > TIdStackWindows Methods > Connect Method
ContentsIndexHome
PreviousUpNext
TIdStackWindows.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;
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 IP address. 

Connect is an overridden procedure that specifies the method used to access the Connect() API for the 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.