Internet Direct (Indy)
Home
PreviousUpNext
TIdServerIOHandler.Accept Method

Specifies the IOHandler framework for a thread or fiber connections to a server.

Pascal
function Accept(
    ASocket: TIdSocketHandle; 
    AListenerThread: TIdThread; 
    AYarn: TIdYarn
): TIdIOHandler; virtual;
Parameters 
Description 
ASocket 
Socket descriptor representing the client connection for the IOHandler.
 
AListenerThread 
Server Listener thread that has detected the connection request.
 
AYarn 
Scheduler for the thread/fiber. 

TIdIOHandler - THe IOHandler created for the client connection to the server.

Accept is a virtual TIdIOHandler function used to create a TIdIOHandler instance for threaded client connections to a server. 

ASocket is the socket descriptor representing the client connection for the IOHandler. 

AListenerThread is the Listener thread in the server that has detected the client connection request. 

AYarn is the scheduler for the threaded or fiber-based client connection. 

Accept is called during execution of the listener thread in a multi-thread server when a new threaded client connection is detected. Accept is used to create the managed TIdIOHandler used to read and write to the client connection during execution of the threaded client. 

Accept can return Nil when the connection cannot be accepted or the listenter thread has been stopped. 

Accept always returns Nil in TIdServerIOHandler, and must be reimplemented in a descendant class (like TIdServerIOHandlerSocket) that provides access to the protocol stack for the platform hosting the Indy library.

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.