Libevent
Software library
title: "Libevent" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["c-(programming-language)-libraries", "events-(computing)", "free-computer-libraries", "software-using-the-bsd-license"] description: "Software library" topic_path: "technology/computing" source: "https://en.wikipedia.org/wiki/Libevent" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Software library ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | libevent |
| developer | Azat Khuzhin, Mark Ellzey, Nick Mathewson, Niels Provos |
| released | |
| latest release version | 2.1.12 |
| latest release date | |
| programming language | C |
| operating system | Cross-platform |
| platform | Unix-like, Windows, OS X |
| genre | Network Library |
| license | BSD |
| website | |
| :: |
| name = libevent | logo = | screenshot = | caption = | collapsible = | author = | developer = Azat Khuzhin, Mark Ellzey, Nick Mathewson, Niels Provos | released = | latest release version = 2.1.12 | latest release date = | status = | programming language = C | operating system = Cross-platform | platform = Unix-like, Windows, OS X | size = | language = | genre = Network Library | license = BSD | website = | frequently updated =
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](dev-poll), kqueue(2), POSIX select(2), Windows IOCP, [poll(2)](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.
Notable applications
Some of the notable applications that take advantage of libevent are:
- Chromium: Google's open-source web browser
- memcached: a high-performance, distributed memory object caching system
- Transmission: a fast, easy, and free BitTorrent client
- NTP: the network time protocol that makes your clock right (uses libevent in SNTP)
- tmux: a terminal multiplexer
- Tor: an anonymous Internet communication system
Alternatives
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
References
- "libevent – an event notification library".
- "LICENSE".
- http://www.monkey.org/~provos/libevent/LICENSE License of libevent
- "An Event Notification Library, Programs using libevent".
- "Old releases".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::