RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseSocket.Select Method

Tests for socket activity.

Pascal
function Select(ReadReady: PBoolean; WriteReady: PBoolean; ExceptFlag: PBoolean; TimeOut: Integer = 0): Boolean;
C++
__fastcall Boolean Select(PBoolean ReadReady, PBoolean WriteReady, PBoolean ExceptFlag, int TimeOut = 0);

Use Select to test for socket activity. Select indicates whether there is any data on the socket waiting to be sent or whether an error condition exists. 

The parameter TimeOut is the time-out value. The socket waits for activity up to TimeOut milliseconds before returning. If TimeOut is not explicitly specified, the default value is zero. If TimeOut is any negative number, the socket is blocked. It waits for activity indefinitely, which can be useful for servers. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!