Libevent
   HOME

TheInfoList



OR:

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 In signal processing, a signal is a function that conveys information about a phenomenon. Any quantity that can vary over space or time can be used as a signal to share messages between observers. The ''IEEE Transactions on Signal Processing'' ...
and regular timeouts. libevent is meant to replace the
event loop In computer science, the event loop is a programming construct or design pattern that waits for and dispatches events or messages in a program. The event loop works by making a request to some internal or external "event provider" (that generally ...
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 Input/output completion port (IOCP) is an application programming interface, API for performing multiple simultaneous asynchronous input/output operations in Windows NT versions 3.5 and later, AIX and on Solaris (operating system), Solaris 10 and ...
, 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". 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 Context may refer to: * Context (language use), the relevant constraints of the communicative situation that influence language use, language variation, and discourse summary Computing * Context (computing), the virtual environment required to su ...
. libevent was created by
Niels Provos Niels Provos is a German-American researcher in security engineering, malware, and cryptography. He received a PhD in computer science from the University of Michigan. From 2003 to 2018, he worked at Google as a Distinguished Engineer on security ...
and is maintained primarily by Azat Khuzhin. It is released under a
BSD license BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lice ...
.


Notable applications

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 (ntpd) is an operating system program that maintains the system time in synchronization with time servers using the Network Time Protocol (NTP). Description The ntpd program is an operating-system daemon that s ...
: the Network Time Protocol
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and Greek mythology, mythology and of later Hellenistic religion and Hell ...
* Tor: an anonymous Internet communication system *
tmux tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. ...
: a terminal multiplexer


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


External links

{{Portal, Free and open-source software
Libevent web page

Libevent github repository

Libevent 2.0 book




C (programming language) libraries Events (computing) Free computer libraries Software using the BSD license