Internet Direct (Indy)
Home
PreviousUpNext
TIdIOHandler.CheckForDataOnSource Method

Determine if data is available in the unbuffered communication layer for the connection.

Pascal
procedure CheckForDataOnSource(
    ATimeout: Integer = 0
); virtual; abstract;
Parameters 
Description 
ATimeout 
Milliseconds to wait for the connection to become readable, or to return data. 

CheckForDataOnSource is an abstract virtual procedure in TIdIOHandler. CheckForDataOnSource must be overridden in a descendant class to allow inspection of the unbuffered data in the source for the connection. 

CheckForDataOnSource is used to determine when new data is available to be added to the buffering mechanism in Indy. 

ATimeout indicates the number of milliseconds to wait for the connection to become readable, or to return data values for the read operation. A descendant class can use ATimeout when appropriate for the transport mechanism. 

CheckForDataOnSource will generally rely on the protected ReadFromSource method to retrieve unbuffered data from the communications layer, and to add the values to an Indy buffer for subsequent processing. 

ReadFromSource is an abstract virtual method in TIdIOHandler, and must be implemented in descendant classes that provide access to a transport for the IOHandler.

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.