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

Accepts a connection request using the socket handle.

function Accept(
    ASocket: TIdStackSocketHandle; 
    var VIP: string; 
    var VPort: Integer; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
): TIdStackSocketHandle; override;
Socket handle to use for accept a new request.
IP address for the remote network on the accepted connection.
Port number for the remote network on the accepted connection.
IP address family for the IP address. 

TIdStackSocketHandle - Socket handle for the accepted connection.

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

Accept is used to extract the first pending connection request on the queue of pending connections for the socket handle in ASocket. 

The return value for the method is the newly created socket handle that will handle the reads and writes for the requested connection. 

VIP and VPort are updated in Accept to reflect the IP address and port number for the remote network connection.

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