Method _Stdio.Fd()->poke()
- Method
poke
int(-1..1)poke()
int(-1..1)poke(int|floattimeout)
int(-1..1)poke(int|floattimeout)- Description
Check if there is buffer space available to write data, or wait some time for available space.
More specifically, a later nonblocking call to write() will succeed in writing some data, or indicate some error (eg if a nonblocking socket failed to connect).
- Parameter
timeout Timeout in seconds.
- Returns
1There is buffer space available, or nonblocking connect() has completed.
0There is no data available (ie timeout), or the call was interrupted by a signal.
-1Error condition. The error code returned by errno() has been updated (eg a nonblocking connect() has failed).
- See also
- Note
The function may be interrupted prematurely of the timeout (due to signals); check the timing manually if this is imporant.