libevent explained

libevent
Developer:Azat Khuzhin, Mark Ellzey, Nick Mathewson, Niels Provos
Latest Release Version:2.1.12
Latest Release Date:[1]
Programming Language:C
Operating System:Cross-platform
Platform:Unix-like, Windows, OS X
Genre:Network Library
License:BSD[2]

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".

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]

Notable applications

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

Google's web browser (Mac and Linux versions)[4]

a high-performance, distributed memory object caching system[5]

an open-source BitTorrent client

Alternatives

Major version releases

External links

Notes and References

  1. Web site: libevent – an event notification library . libevent.org . 17 September 2021.
  2. Web site: LICENSE . Github . 30 August 2019.
  3. http://www.monkey.org/~provos/libevent/LICENSE License of libevent
  4. Web site: third_party/libevent - chromium/chromium - Git at Google . 2023-04-30 . chromium.googlesource.com.
  5. Web site: Install . 2023-04-30 . GitHub . en.
  6. Web site: tmux/README at Master - tmux/tmux - GitHub. .