Why can I use standard I/O multiplexing functions such as select() or poll() on ØMQ sockets?
ØMQ socket is not a standard POSIX socket. It would be great if it was, however, POSIX doesn’t provide a mechanism to simulate file descriptors in user space. To convert ØMQ sockets into POSIX file descriptors we would have either to move ØMQ to kernel-space or hack the kernel to provide the functionality needed. In both cases we would have to sacrifice portability and stick to a single operating system. Note that there’s a way to retrieve a file descriptor from ØMQ socket (ZMQ_FD socket option) that you can poll on from version 2.1 onwards, however, there are some serious caveats when using it. Check the documentation carefully before using this feature.
Related Questions
- Must a manager request all the programs listed in the Qualification Standard for positions classified as CS or can he/she select the relevant ones and/or add any others that are also appropriate?
- Why is there a slight delay the very first time I select certain functions, and then that same function responds faster every time after that?
- What is the difference between a standard Luxeon Star and a Luxeon/O?