Internet Direct (Indy)
Home
PreviousUpNext
TIdStackDotNet.Accept Method

Accepts a connection request using the socket handle.

Pascal
function Accept(
    ASocket: TIdStackSocketHandle; 
    var VIP: string; 
    var VPort: Integer; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
): TIdStackSocketHandle; override;
Parameters 
Description 
ASocket 
Socket handle to use for accept a new request.
 
VIP 
IP address for the remote network on the accepted connection.
 
VPort 
Port number for the remote network on the accepted connection.
 
AIPVersion 
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.

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.