The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. . libevent is meant to replace the asynchronous event loop found in event driven network servers. Currently, libevent supports kqueue(2) and select(2).