libevent analysis

libevent features Implementation
Cross-platform support linux 、 windows 、 BSD 、 Solaris
memory pool management Not implemented, only a custom interface is provided
IO multiplexing Support epoll, poll, select, dev/poll, IOCP
IO buffer support. evbuffer. The back node is twice the size of the previous node
multiple buffers 支持。 writev、readev
Multiple bufferevents

1. Socket-based bufferevent

2. Paired bufferevents

3. Filtered bufferevent (such as compressing, converting data)

zero-copy technology support. sendfile, mmap
timed event

support.

Default binary heap algorithm O(logN)

Common timeout can be optimized, bidirectional link achieves O(1)

event_base_init_common_timeout

signal event support
DNS protocol support
OpenSSL protocol support
rate limit

support

bufferevent_set_rate_limit

Support group restrictions

bufferevent_rate_limit_group_new

   

Reference: LibEvent code reading -- multiple buffers and zero-copy technology

Libevent source code analysis-----evbuffer structure and basic operations

libevent: evbuffer buffering (transfer)

Carefully analyze mmap: what is why and how to use it

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326807146&siteId=291194637