'return the event type associated with a kevent object
:param kevent kevent: a kevent object as returned by kqueue.control()'

@staticmethod
def _map_event(kevent):

    if (kevent.filter == select.KQ_FILTER_READ):
        return READ
    elif (kevent.filter == select.KQ_FILTER_WRITE):
        return WRITE
    elif (kevent.flags & select.KQ_EV_ERROR):
        return ERROR
