zStatus zReceiver_Wait(zReceiver receiver, z64u timeout);
|
Parameters |
Description |
|
zReceiver receiver |
zReceiver object. |
|
z64u timeout |
Timeout period, in microseconds. |
Waits until one or more bytes is available to read, or until the specified timeout period elapses.
This function can be used in conjuction with zReceiver_Read to read bytes directly from the underlying socket. Call zReceiver_Wait until a message has arrived, then call zReceiver_Read to read out the message.
The timeout supplied to this function may not be strictly honored for active mode connections during an interval in which the remote data provider is re-establishing the connection. Under such conditions, the real timeout might vary from 0 to 2*timeout.
This function will fail if a callback handler was registered with the zReceiver_SetReceiveHandler function.
This function can only be called after calling zReceiver_Open.
zReceiver.h