| @@ -1,14 +1,19 @@ | | | @@ -1,14 +1,19 @@ |
1 | The libevent API provides a mechanism to execute a callback function when a | | 1 | The libevent API provides a mechanism to execute a callback function when a |
2 | specific event occurs on a file descriptor or after a timeout has been | | 2 | specific event occurs on a file descriptor or after a timeout has been |
3 | reached. | | 3 | reached. Furthermore, libevent also support callbacks due to signals or |
| | | 4 | regular timeouts. |
4 | | | 5 | |
5 | libevent is meant to replace the asynchronous event loop found in event | | 6 | libevent is meant to replace the asynchronous event loop found in event |
6 | driven network servers. An application just needs to call event_dispatch() | | 7 | driven network servers. An application just needs to call event_dispatch() |
7 | and can then add or remove events dynamically without having to change the | | 8 | and can then add or remove events dynamically without having to change the |
8 | event loop. | | 9 | event loop. |
9 | | | 10 | |
10 | Currently, libevent supports kqueue(2) and select(2). Support for poll(2) | | 11 | Currently, libevent supports /dev/poll, kqueue(2), event ports, select(2), |
11 | and /dev/poll is planned. The internal event mechanism is completely | | 12 | poll(2), and epoll(4). The internal event mechanism is completely independent |
12 | independent of the exposed event API, and a simple update of libevent can | | 13 | of the exposed event API, and a simple update of libevent can provide new |
13 | provide this new functionality without having to redesign the server | | 14 | functionality without having to redesign the applications. |
14 | applications. | | 15 | |
| | | 16 | Libevent additionally provides a sophisticated framework for buffered network |
| | | 17 | IO, with support for sockets, filters, rate-limiting, SSL, zero-copy file |
| | | 18 | transmission, and IOCP. Libevent includes support for several useful protocols, |
| | | 19 | including DNS, HTTP, and a minimal RPC framework. |