diff options
Diffstat (limited to 'util/tube.h')
| -rw-r--r-- | util/tube.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/tube.h b/util/tube.h index 5b1fdb8e8f46..5e4fb86445c9 100644 --- a/util/tube.h +++ b/util/tube.h @@ -205,6 +205,14 @@ int tube_poll(struct tube* tube); int tube_wait(struct tube* tube); /** + * Wait for data to be ready with a timeout. + * @param tube: the tube to wait on. + * @param msec: timeout in milliseconds. + * @return 1 if there is something to read within timeout, readability. + * 0 on a timeout. On failures -1, like errors. */ +int tube_wait_timeout(struct tube* tube, int msec); + +/** * Get FD that is readable when new information arrives. * @param tube * @return file descriptor. |
