QP_wait_input()

Synopsis

     #include <quintus/quintus.h>
     
     int QP_wait_input(id,timeout)
     int id;
     int *timeout;
     

Wait until I/O is ready on a file descriptor or until a timeout occurs

Description

QP_wait_input() waits until input is ready on file descriptor id or until timeout milliseconds pass. If timeout is QP_NO_TIMEOUT, it waits indefinitely for input to arrive on id. While waiting, QP_wait_input() makes sure that registered callbacks are called when input is ready on other file descriptors. However, no callback will be called when input is ready on id even if one is registered, rather QP_wait_input() returns immediately.

Return Values


QP_SUCCESS
if input arrived on id
QP_FAILURE
if a timeout occurred
QP_ERROR
if an error occurs

See Also

QP_select(), QP_add_*()