One, libevent features
Libevent is a lightweight open source high-performance network library with a wide range of applications. For example, the familiar memcached, chrome and so on.
Libevent has the following advantages:
- Event driven, high performance
- Lightweight, focused on the network
- Cross-platform and can run on mainstream operating systems.
- Scalability, considering various usage scenarios, provides good performance.
- Convenient and reliable, you only need to call a small amount of libevent interface to use the libevent library well.
Second, the main functions of libevent
- Libevent uses the Reactor reactor model. The reactor mode has the advantages of fast response, simple programming, extensibility, and reusability.
- It supports multiple I/O multiplexing mechanisms, such as select, poll, epoll, kqueue, dev/poll, evports, etc. It can run on Windows, Linux, BSD, Mac Os, Solaris systems.
- The evbuffer with very good scalability is realized, which is used for the receiving and sending buffer of user layer data, and supports the restriction of communication traffic.
- Provides a timer function.
- Support http service.