Topic Path: Symbol Reference > Classes > TIdSocketListDotNet Class > TIdSocketListDotNet Methods > Select Method
ContentsIndexHome
PreviousUpNext
TIdSocketListDotNet.Select Method

Determine the status of one or more sockets handles.

class function Select(
    AReadList: TIdSocketList; 
    AWriteList: TIdSocketList; 
    AExceptList: TIdSocketList; 
    const ATimeout: Integer = IdTimeoutInfinite
): Boolean; override;
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 an overridden Boolean class function that implements 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. 

Select calls the Socket.Select method for the framework using parameters supplied in the method. 

ATimeout indicates the number of milliseconds to wait for successful completion of the Select() API call. When ATimeout contains IdTimeoutInfinite, MaxLongint is used as an argument for the framework method. 

Select ensures the socket lists in AReadList, AWriteList, and AExceptList are cast to a TIdSocketListDotNet instance. 

Select will return a Boolean value that indicates if any one of the socket lists in AReadList, AWriteList, and AExceptList has a non-zero length. 

Select may return False if an ArgumentNullException exception is encountered (and handled) in the method. All other exceptions in the method are re-raised using either the EIdSocketError or EIdWrapperException exception types.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.