Libevent

libeventDeveloper(s)| Azat Khuzhin, Mark Ellzey, Nick Mathewson, Niels Provos

|

Initial release| April 9, 2002; 24 years ago (2002-04-09)
Stable release|

2.1.12 / July 5, 2020; 6 years ago (2020-07-05)[1]

Written in| C
Operating system| Cross-platform
Platform| Unix-like, Windows, OS X
Type| Network Library
License| BSD[2]
Website| libevent.org

libevent is a software library that provides asynchronous event notification. The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. libevent also supports callbacks triggered by signals and regular timeouts.

libevent is meant to replace the event loop found in event-driven network servers. An application can just call `event_dispatch()` and then add or remove events dynamically without having to change the event loop.

Currently, libevent supports `/dev/poll`, `kqueue(2)`, POSIX `select(2)`, Windows IOCP, `poll(2)`, `epoll(7)` and Solaris event ports. It also has experimental support for real-time signals. The exposed event API is uniform over all of the supported platforms. As a result, libevent allows for portable application development and provides "the most scalable event notification mechanism available on an operating system".[1]

Using callbacks on signals, libevent makes it possible to write "secure" signal handlers as none of the user supplied signal handling code runs in the signal's context.

libevent was created by Niels Provos and is maintained primarily by Azat Khuzhin. It is released under a BSD license.[3]

## Contents

* 1 Notable applications
* 2 Alternatives
* 3 Major version releases
* 4 References
* 5 External links

## Notable applications

Some of the notable applications that take advantage of libevent are:

* Google Chrome: Google's web browser (Mac and Linux versions)[4]
* Memcached: a high-performance, distributed memory object caching system[5]
* Transmission: an open-source BitTorrent client
* ntpd: the Network Time Protocol daemon
* Tor: an anonymous Internet communication system
* tmux: a terminal multiplexer[6]

## Alternatives

* libev
* libuv
* FAM
* Boost Asio

## Major version releases

* libevent 2.1 was released on April 3, 2012.
* libevent 2.0 was released on April 17, 2009.
* libevent 1.4 was released on November 11, 2007.
* libevent 1.3 was released on February 15, 2007.
* libevent 1.2 was released on October 15, 2006.
* libevent 1.1 was released on May 14, 2005.

## References

1. ↑ 1.0 1.1 "libevent – an event notification library". https://libevent.org/. Retrieved 17 September 2021.
2. ↑ "LICENSE". https://github.com/libevent/libevent/blob/master/LICENSE. Retrieved 30 August 2019.
3. ↑ http://www.monkey.org/~provos/libevent/LICENSE License of libevent
4. ↑ "third_party/libevent - chromium/chromium - Git at Google". https://chromium.googlesource.com/chromium/chromium/+/master/third_party/libevent.
5. ↑ "Install" (in en). https://github.com/memcached/memcached/wiki/Install.
6. ↑ "tmux/README at Master - tmux/tmux - GitHub". https://github.com/tmux/tmux/blob/master/README#L9.

## External links

* Libevent web page
* Libevent github repository
* Libevent 2.0 book
* Dan Kegel's "The C10K problem" web page
* A benchmark by the libev author comparing libevent with libev, a similar library

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Libevent. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Libevent&oldid=714329"