mcpp index

compat.libevent

#include

Libevent asynchronous event notification and networking library

#include <event2/event.h>
mcpp add compat.libevent@2.1.13

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

#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 · 專案 tests/examples/libevent

建置

targets
event (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/include, config/include, */compat, */WIN32-Code

原始檔 (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

版本

版本平台 鏡像sha256
2.1.13 最新 LinuxWindowsmacOS 來源 1a0885e17dc7…