Internet Direct (Indy) Version 9.0.1 Beta
|
function Accept(ASocket: TIdStackSocketHandle): boolean;
Accept is used by the listening thread of server applications that spawn new threads for each connection request, like TIdListenerThread and TIdUDPListenerThread.
Accept assigns the new socket descriptor to Handle and sets HandleAllocated to True.
Accept calls UpdateBindingLocal to insure that the protocol stack handler uses the correct protocol family, IP, and Port for servers that may listen on more than one local IP address.
Accept calls UpdateBindingPeer to insure that the protocol stack handler uses the correct protocol family, PeerIP, and PeerPort for the client connection.
If no pending connections are present on the socket descriptor, Accept will wait until a connection is present before exiting from the method.