generic wrapper for event libraries
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Stefan Bühler f5fc31c6b7 Initial commit 7 年前
src Initial commit 7 年前
.gitignore Initial commit 7 年前
COPYING Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前 Initial commit 7 年前
libevcon-ev0.symbols Initial commit 7 年前
libevcon-event0.symbols Initial commit 7 年前
libevcon-glib0.symbols Initial commit 7 年前
libevcon0.symbols Initial commit 7 年前


evon is a generic wrapper library that sits between libraries that need socket (file descriptor), timeout and (thread safe) asynchronous events, and an application that wants to use the library.


Should work on all POSIX compatible platforms.


Event types:

  • read and write events for asynchronous file descriptors (sockets)
  • simple timeout events
  • (thread safe) asynchronous events (notifications - for example from other threads, that wakeup the event loop)

Backends for:

Simple Scenario

You want to write an application that uses two different event based libraries; if these libraries don’t use the same event loop (say X uses libev and Y libevent) you will have difficulties using them - you could give each library its own thread for example, but embedding one event loop in another is usually not easy.

If the libraries were built against evcon, you could use any event loop - if there is no backend for it yet, you probably can write one.


See src/tests/evcon-echo.c and src/tests/evcon-echo.h for an example “library”, and src/tests/evcon-test-*.c for how to use them in an application.

Building from git

Run the following in the source directory to prepare the build system:


You will need automake and autoconf for this.


All backends need glib (>= 2.14). The libev backend needs libev >= 4, the libevent backend needs libevent >= 2.

Build in a sub directory:

mkdir build
cd build
make check

Install (probably has to be run as root):

make install

As always it is recommended to use a package system to install files instead (dpkg, rpm, ...).