Internet Direct (Indy)
Home
PreviousUpNext
TIdSocketList.Select Method

Determine the status of one or more sockets handles.

Pascal
class function Select(
    AReadList: TIdSocketList; 
    AWriteList: TIdSocketList; 
    AExceptList: TIdSocketList; 
    const ATimeout: Integer = IdTimeoutInfinite
): Boolean; virtual;
Parameters 
Description 
AReadList 
List of socket handles checked for readability.
 
AWriteList 
List of socket handles checked for writability.
 
AExceptList 
List of socket handles checked for exceptions or OOB data.
 
ATimeout 
Timeout value for the Select() API call. 

Boolean - True if an error did not occur in the Select() API call.

Select is a virtual Boolean class function that specifies the method used to access the Select() API for a protocol stack implementation. 

Select is used to determine the status of one or more sockets. 

AReadList is a list of socket handles to be checked for readability. AReadList will include socket handles where listen has been called and a connection is pending, data is available for reading (including OOB data), or the connection has been closed/reset/terminated. 

AWriteList is a list of socket handles to be checked for writability. AWriteList will include socket handles where a connection has opened, and data can be sent. 

AExceptList is a list of socket handles to be checked for the presence of Out-Of-Band data or any error conditions. AExceptList will include socket handles where Out-Of-Band data is available for reading when SO_OOBINLINE is disabled. 

Any two of the socket handle lists may be omitted, but at least one socket handle list must be provided to the Select() API call. 

ATimeout indicates the number of milliseconds to wait for successful completion of the Select() API call. 

Select must be implemented in a descendant class using the protocol stack and list implementation for a specific operating system or platform. 

Select will return a Boolean value that indicates if the numeric error code for the operation was a positive non-zero value. 

Please note that Select is not declared as an abstract method in TIdSocketList because C++ Builder does not allow abstract class functions. It's implementation in TIdSocketList simply returns False to satisfy the requirements of the C++ Builder compiler.

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.