hb_inetDataReady()

HB_INETDATAREADY()

Get whether there is data ready in a socket

Syntax

      HB_INETDATAREADY( <socket>, [ <nMillisec> ] ) -> nResult

Arguments

<socket> a socket previously created / opened

<nMillisec>

Returns

If there is data available 1 (one) is returned, 0 (zero) if there is no data and -1 if there is an error.

Description

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.

Compliance

Harbour

Advertisements

One response to “hb_inetDataReady()

  1. Pingback: Harbour inet Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s