Internet Direct (Indy)
|
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;
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 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. Accept calls TranslateTInAddrToString to convert the native IP address to a string value for VIP, and NToHs to convert the byte order for the port number in VPort.
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. |