Registers a callback that will be called when a file descriptor is ready for I/O.
This will add the given file descriptor to the internal set of file descriptors that will be passed to the poll() call. When this file descriptor has data to read the readCallback will be called.
- Parameters
-
fd | the file descriptor to be monitored |
readCallback | a callback that will be called when the file descriptor has data to read. The file descriptor will be passed as an argument |
eventMask | a bit mask specifying the events you are interested in for the file descriptor. The possible values for this are defined in <poll.h> |