All Projects → troglobit → Libuev

troglobit / Libuev

Licence: mit
Lightweight event loop library for Linux epoll() family APIs

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Libuev

Noel
A universal, human-centric, replayable javascript event emitter.
Stars: ✭ 158 (-7.06%)
Mutual labels:  event-driven, event
libapenetwork
Fast cross-platform async network library
Stars: ✭ 17 (-90%)
Mutual labels:  event-driven, epoll
event-driven-web-components-realworld-example-app
Exemplary real world application built with Vanilla JS Web Components in an Event Driven Architecture
Stars: ✭ 55 (-67.65%)
Mutual labels:  event, event-driven
evon
Fast and versatile event dispatcher code generator for Golang
Stars: ✭ 15 (-91.18%)
Mutual labels:  event, event-driven
Gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go./ gnet 是一个高性能、轻量级、非阻塞的事件驱动 Go 网络框架。
Stars: ✭ 5,736 (+3274.12%)
Mutual labels:  event-driven, epoll
EventEmitter
Simple EventEmitter with multiple listeners
Stars: ✭ 19 (-88.82%)
Mutual labels:  event, event-driven
UT GameEventSystem
A flexible event system in Unreal Engine 4
Stars: ✭ 33 (-80.59%)
Mutual labels:  event, event-driven
llb
Dead simple event-driven load-balancer
Stars: ✭ 27 (-84.12%)
Mutual labels:  event-driven, epoll
ev
Lightweight event-loop library based on multiplexing IO
Stars: ✭ 15 (-91.18%)
Mutual labels:  event-driven, epoll
sol
Lightweight MQTT broker, written from scratch. IO is handled by a super simple event loop based upon the most common IO multiplexing implementations.
Stars: ✭ 72 (-57.65%)
Mutual labels:  event-driven, epoll
azeroth-event
Lightweight event-driven framework
Stars: ✭ 18 (-89.41%)
Mutual labels:  event, event-driven
Gev
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
Stars: ✭ 1,082 (+536.47%)
Mutual labels:  event-driven, epoll
Qmq
QMQ是去哪儿网内部广泛使用的消息中间件,自2012年诞生以来在去哪儿网所有业务场景中广泛的应用,包括跟交易息息相关的订单场景; 也包括报价搜索等高吞吐量场景。
Stars: ✭ 2,420 (+1323.53%)
Mutual labels:  event-driven, event
netpoll
Package netpoll implements a network poller based on epoll/kqueue.
Stars: ✭ 38 (-77.65%)
Mutual labels:  event-driven, epoll
epump
ePump是一个基于I/O事件通知、非阻塞通信、多路复用、多线程等机制开发的事件驱动模型的 C 语言应用开发框架,利用该框架可以很容易地开发出高性能、大并发连接的服务器程序。
Stars: ✭ 26 (-84.71%)
Mutual labels:  event-driven, epoll
Zeus
A high performance, cross-platform Internet Communication Engine. Developed with native socket API. Aim at handling millions of concurrent connections.
Stars: ✭ 30 (-82.35%)
Mutual labels:  event-driven, epoll
Neventlite
NEventLite - An extensible lightweight library for .NET that manages the Aggregate lifecycle in an Event Sourced system. Supports Event and Snapshot storage providers like EventStore/Redis or SQL Server. Built with dependency injection in mind and seamlessly integrates with AspNetCore.
Stars: ✭ 117 (-31.18%)
Mutual labels:  event-driven, event
Lotos
tiny but high-performance HTTP Server
Stars: ✭ 140 (-17.65%)
Mutual labels:  epoll
Eomaia
一个基于reactor模式的Linux/C++网络库,支持one loop per thread机制。
Stars: ✭ 159 (-6.47%)
Mutual labels:  epoll
Booster
Booster Cloud Framework
Stars: ✭ 136 (-20%)
Mutual labels:  event-driven

µEv | Simple event loop for Linux

Travis Status Coverity Status

NOTE: Incompatible failure mode changes in v2.0 compared to v1.x!

Introduction

libuEv is a small event loop that wraps the Linux epoll() family of APIs. It is similar to the more established libevent, libev and the venerable Xt(3) event loop. The µ in the name refers to both its limited feature set and the size impact of the library.

Failure mode changes introduced in v2.0 may affect users of v1.x, See the ChangeLog for the full details.

The API documentation is available as a separate document.

Example

Notice how watcher conditions like UEV_ERROR must be handled by each callback. I/O watchers must also check for UEV_HUP. Both errors are usually fatal, libuEv makes sure to stop each watcher before a callback runs, leaving it up to the callback to take appropriate action.

/* Set up a timer watcher to call cb() every other second */
#include <stdio.h>
#include <uev/uev.h>

static void cb(uev_t *w, void *arg, int events)
{
        if (UEV_ERROR == events) {
            puts("Problem with timer, attempting to restart.");
            uev_timer_start(w);
        }

        puts("Every other second");
}

int main(void)
{
        uev_ctx_t ctx;
        uev_t timer;

        uev_init(&ctx);
        uev_timer_init(&ctx, &timer, cb, NULL, 2 * 1000, 2 * 1000);

        return uev_run(&ctx, 0);
}

Build & Install

libuEv use the GNU configure and build system. To try out the bundled examples, use the --enable-examples switch to the configure script. There is also a limited unit test suite that can be useful to learn how the library works.

./configure
make -j5
make test
sudo make install-strip
sudo ldconfig

The resulting .so library is ~23 kiB.

To build from GIT sources; clone the repository and run the autogen.sh script. This requires GNU automake, autoconf amd libtool to be installed on your system. (If you build from a released tarball you do not need them.)

Origin & References

libuEv is developed and maintained by Joachim Wiberg on GitHub. It is primarily built for and developed on GNU/Linux systems, patches to support the BSD kqueue interface are most welcome.

Originally based on LibUEvent by Flemming Madsen, uEv has since evolved to support all of the Linux epoll() family APIs. It is now more similar to the excellent libev by Mark Lehmann, with some inspiration also from picoev by Oku Kazuho.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].