Topic Path: Symbol Reference > Classes > TIdStackDotNet Class > TIdStackDotNet Methods > Accept Method
TIdStackDotNet.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 overridden TIdStackSocketHandle function that implements the method used to access the Accept() API for the 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. Accept calls the TIdStackSocketHandle.Accept method to get the socket handle used inthe return value. 

Exceptions that occur in the method are re-raised as either the EIdSocketError or EIdWrapperException exception types.

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