poll.register(fd[, eventmask])
Register a file descriptor with the polling object. Future calls to the poll() method will then check whether the file descriptor has any pending I/O events. fd can be either an integer, or an object with a fileno() method that returns an integer. File objects implement fileno(), so they can also be used as the argument.
Note here: fd can be either an integer, or an object with a fileno() method that returns an integer.
So, in issue #15 #16, we use register and other functions just like:
# connection is a socket object and has fileno() function.
poller.register(connection, READ_ONLY)
epoller.register(connection, READ_ONLY)
Note here: fd can be either an integer, or an object with a fileno() method that returns an integer.
So, in issue #15 #16, we use register and other functions just like: