System.Net.Socket.TSocket.WaitForData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function WaitForData(ATimeout: Cardinal = INFINITE): TWaitResult;

C++

System::Types::TWaitResult __fastcall WaitForData(unsigned ATimeout = (unsigned)(0xffffffff));

Properties

Type Visibility Source Unit Parent
function protected
System.Net.Socket.pas
System.Net.Socket.hpp
System.Net.Socket TSocket

Description

Returns only once your socket receives data from a remote host.

You may use the ATimeout parameter to specify a maximum time in milliseconds to wait for incoming data. If the specified maximum time passes and there is no incoming data, WaitForData returns.

WaitForData returns wrTimeout if the specified time limit expired or wrSignaled otherwise.

Exceptions

WaitForData calls some methods that may raise exceptions:

See Also