specific event occurs on a file descriptor or after a timeout has been
reached. Furthermore, libevent also support callbacks due to signals or
libevent is meant to replace the event loop found in event driven network
servers. An application just needs to call event_dispatch() and then add or
remove events dynamically without having to change the event loop.
Fast portable non-blocking network programming with Libevent
libevent入门教程：Echo Server based on libevent
How to use epoll? A complete example in C