VMS Help  —  TCPIP Services, Programming Interfaces, Socket API Functions, poll()  Description
    This function provides applications with a mechanism for
    multiplexing input/output over a set of file descriptors. For
    each member of the array pointed to by fds, poll() examines the
    given file descriptor for the events specified in events. The
    number of pollfd structures in the fds array is specified by
    nfds. The poll() function identifies those file descriptors on
    which an application can read or write data, or on which certain
    events have occurred.
    The fds argument specifies the file descriptors to be examined
    and the events of interest for each file descriptor. It is a
    pointer to an array with one member for each open file descriptor
    of interest. The array's members are pollfd structures within
    which fd specifies an open file descriptor, and events and
    revents are bitmasks constructed by OR-ing a combination of the
    following event flags:
    o  POLLIN
       Normal data may be received without blocking.
    o  POLLRDNORM
       Same as POLLIN.
    o  POLLRDBAND
       Out-of-band data may be received without blocking.
    o  POLLPRI
       Same as POLLRDBAND
    o  POLLOUT
       Normal data may be written without blocking.
    o  POLLWRNORM
       Same as POLLOUT.
    o  POLLWRBAND
       Out-of-band data may be written without blocking.
    If the value of fd is less than 0, events is ignored and revents
    is set to 0 in that entry on return from poll(). In each pollfd
    structure, poll() clears the revents member except that where the
    application requested a report on a condition by setting one of
    the bits of events listed above, poll() sets the corresponding
    bit in revents if the requested condition is true.
    If none of the defined events have occurred on any selected file
    descriptor, poll() waits at least timeout milliseconds for an
    event to occur on any of the selected file descriptors. If the
    value of timeout is 0, poll() returns immediately. If the value
    of timeout is -1, poll() blocks until a specified event occurs or
    until the call is interrupted.
    The poll() function is not affected by the O_NONBLOCK flag.
    On OpenVMS, the poll() function supports sockets only.
                                   NOTE
       HP recommends using the select() function for optimal
       performance. The poll() function is provided to ease the
       porting of existing applications from other platforms.
Close Help