libevent

From Wikipedia, the free encyclopedia
Jump to: navigation, search
libevent
Developer(s) Nick Mathewson, Niels Provos
Stable release 2.0.21 / November 18, 2012; 16 months ago (2012-11-18)
Written in C
Operating system Cross-platform
Type Network Library
License BSD
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), select(2), poll(2), epoll(4) and Solaris's 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. It is released under a BSD license.[2]

Notable applications[edit]

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

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

Alternatives[edit]

  • libev tries to solve some inherent problems in libevent due to architectural decisions.
  • FAM

Major version releases[edit]

  • 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[edit]

External links[edit]