Menu

#1 select vs. poll

open
vitki
5
2008-06-22
2008-06-22
vitki
No

Hub should be able to handle lots of clients. This program is designed primarily for Unix hosts. POSIX has poll. Thus, always use poll in hub.

oWatch handles only one or at most two socket descriptors (TCP for connections and UDP for health status). Thus, only select. It is available everywhere, not only on POSIX machines, but also on Windows, VxWorks, QNX etc.

oSubj also handles at most two sockets (to accept a single connection and a the accepted connection) and is intended for a wide variety of OSes. Thus, select.

Discussion


Log in to post a comment.