Introduction
Laymen explanation
If you have done socket programming, we must remember that code must waits for data from other end and also sometimes it need to wait before writting since other end is still processing previously sent data. So, we need a mechanism to get notified when socket has data to read and when it is safe to send data. Libraries Libevent(linux/freebsd), kqueue(freebsd only), epoll(linux only) help to achieve this
kqueue works only in Freebsd. Epoll works only in Linux. Libevent provides support for both Linux and Freebsd. Looks good. But we need to understand if Libevent supports all features of kqueue and Epoll.
Technical explanation
There are feature differences between EPOLL and KQUEUE as shown in below table.
Reference
https://sourceforge.net/p/levent/feature-requests/36/
https://www.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html
http://codefundas.blogspot.in/2010/09/create-tcp-echo-server-using-libev.html
http://software.schmorp.de/pkg/libev.html
http://linux.die.net/man/3/ev
https://launchpad.net/ubuntu/trusty/+package/libev-dev