Internet Direct (Indy) Version 9.0.1 Beta
TIdServerIOHandlerSocket.Accept
Realizes a socket-based IO handler for a threaded client connection.

function Accept(ASocket: TIdStackSocketHandle): TIdIOHandler; override;
Parameters
ASocket: TIdStackSocketHandle
Handle for the listener thread detecting the client connection.

Returns
TIdIOHandler - IO handler to use for the threaded client connection.

Description
Accept is a TIdIOHandler function that allows a multi-thread server to realize a TIdIOHandlerSocket instance using sockets as the input/output source for a threaded client connections.

Accept creates and opens a TIdIOHandlerSocket instance that is used to accept the bind the socket handle provided in ASocket to a client connection.

Accept is called by the listener thread for the multi-thread server when a new threaded client connection is detected. Accept is used to create the TIdIOHandler using the socket handler for the listener thead. The return value is assigned to the TIdTCPConnection.IOHandler in the threaded client connection for subsequent input/output operations.