code: public final boolean register(final Socket socket, final BiFunction<Socket, Integer, Boolean> handler,
                                    final int events)
      {
          return register(socket, new ComposeEventsHandler(handler, null), events);
      }
docs: Register a Socket for polling on specified events.
  
  @param socket   the registering socket.
  @param handler  the events handler for this socket
  @param events   the events to listen to, as a mask composed by ORing POLLIN, POLLOUT and POLLERR.
  @return true if registered, otherwise false