Get whether there is data ready in a socket
HB_INETDATAREADY( <socket>, [ <nMillisec> ] ) -> nResult
<socket> a socket previously created / opened
If there is data available 1 (one) is returned, 0 (zero) if there is no data and -1 if there is an error.
Verifies if some data is available to be read in the socket without blocking execution of the caller.
If nMillisecs is not given, the function returns immediately 1 if there is some data to be read, 0 if there isn’t any data and -1 in case of error.
If nMillisecs is given, the functon will wait up to that amount of milliseconds for data to be available; if some data arrives in the meanwhile, the wait is immediately interrupted.
The next hb_InetRecv() function will read all the available data (up to the required length) without blocking.
On error, hb_InetErrorCode and hb_InetErrorDesc can be use to determine what kind of error happened.