compat.libevent
#includeLibevent asynchronous event notification and networking library
#include <event2/event.h>
mcpp add compat.libevent@2.1.13
Usage
From this repository's own test project — built and run by CI, not written for the website.
#ifdef _WIN32
#include <winsock2.h>
#endif
#include <event2/buffer.h>
#include <event2/event.h>
#include <event2/http.h>
#include <cstring>
#include <cstdio>
static void fired(evutil_socket_t, short, void* arg) {
++*static_cast<int*>(arg);
}
int main() {
#ifdef _WIN32
WSADATA winsock;
if (WSAStartup(MAKEWORD(2, 2), &winsock) != 0) return 1;
#endif
event_base* base = event_base_new();
if (!base) {
// …
tests/examples/libevent/tests/event.cpp · project tests/examples/libevent
Build
- targets
event (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include, config/include, */compat, */WIN32-Code
Sources (20)
*/buffer.c*/bufferevent.c*/bufferevent_filter.c*/bufferevent_pair.c*/bufferevent_ratelim.c*/bufferevent_sock.c*/event.c*/evmap.c*/evthread.c*/evutil.c*/evutil_rand.c*/evutil_time.c*/listener.c*/log.c*/signal.c*/strlcpy.c*/event_tagging.c*/http.c*/evdns.c*/evrpc.c
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
2.1.13 latest |
LinuxWindowsmacOS | source | 1a0885e17dc7… |