From c3f9d0dc8de9ac025f01c0de13caff7eb5bc5e29 Mon Sep 17 00:00:00 2001 From: fm Date: Wed, 14 Mar 2012 11:25:42 +0100 Subject: [PATCH] Add README --- README | 39 +++++++++++++++++++++++++++++++++++++++ libuevent.h | 1 + 2 files changed, 40 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..cd4cad9 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +LibUEvent - A Microscopic event library. +======================================== + +The libuevent library is a small event library in the style of the venerable +Xt(3) event loop. + +Basically an event context is created,and handlers for timeounts and stream +events can be registered with this context. + +After initial setup, the typical application will enter the event loop that +will only return at program termination. + +The C API +--------- +The typical application will do the following steps +1. Create the event context with lueCtxtCreate() +2. Register initial callbacks with lueAddInput, lueAddOutput and lueAddTimer +3. Enter the event loop + +Lua binding +----------- +A lua binding is available that should mix well with luasocket and luaposix. + +Building +-------- +Use make: + +* make all: The library +* make test: Test and showcase +* make lua: Build the lua binding + +Installation +------------ +Is purely manual, but would be something along the lines of: + sudo install -m 444 libuevent.so.1 /usr/lib/libuevent.so.1 + sudo install -m 444 lualue.so /usr/lib/lua/5.1/lue.so + + + diff --git a/libuevent.h b/libuevent.h index 15969ed..a92d09e 100644 --- a/libuevent.h +++ b/libuevent.h @@ -45,6 +45,7 @@ struct LUECtxt *lueCtxtCreate(); void lueCtxtDestroy(struct LUECtxt *lue); void lueTimeAdvance(struct LUECtxt *ctxt, int mSecs); void lueRun(struct LUECtxt *ctxt); +void lueProcessEvents(struct LUECtxt *ctxt); void lueExit(struct LUECtxt *ctxt); #endif