mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-27 20:58:43 +00:00
README: Minor cleanup, after comments by @vonj
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
3094ef2887
commit
8e1f384c38
1 file changed
+9
-8
@@ -9,7 +9,7 @@ often swing without consideration. Event loops and non-blocking I/O is
|
|||||||
often a far easier approach, as well as less error prone.
|
often a far easier approach, as well as less error prone.
|
||||||
|
|
||||||
The purpose of many applications is, with a little logic sprinkled on
|
The purpose of many applications is, with a little logic sprinkled on
|
||||||
top, to act on: network packets entering an interface, timeouts
|
top, to act upon: network packets entering an interface, timeouts
|
||||||
expiring, mouse clicks, or other types of events. Such applications are
|
expiring, mouse clicks, or other types of events. Such applications are
|
||||||
often very well suited to use an event loop.
|
often very well suited to use an event loop.
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ LibuEv is a simple event loop in the style of the more established
|
|||||||
[Xt(3)](http://unix.com/man-page/All/3x/XtDispatchEvent) event loop.
|
[Xt(3)](http://unix.com/man-page/All/3x/XtDispatchEvent) event loop.
|
||||||
The *u* (micro) in the name refers to both the small feature set and the
|
The *u* (micro) in the name refers to both the small feature set and the
|
||||||
small size overhead impact of the library. The primary target of libuEv
|
small size overhead impact of the library. The primary target of libuEv
|
||||||
is modern Linux systems.
|
is a modern Linux system.
|
||||||
|
|
||||||
Experienced developers may appreciate that libuEv is built on top of
|
Experienced developers may appreciate that libuEv is built on top of
|
||||||
modern Linux APIs: epoll, timerfd and signalfd.
|
modern Linux APIs: epoll, timerfd and signalfd.
|
||||||
@@ -101,15 +101,15 @@ Summary:
|
|||||||
4. Leave the event loop with `uev_exit()`, possibly from a callback
|
4. Leave the event loop with `uev_exit()`, possibly from a callback
|
||||||
|
|
||||||
**Note:** Make sure to use non-blocking stream I/O! Most hard to find
|
**Note:** Make sure to use non-blocking stream I/O! Most hard to find
|
||||||
bugs in event driven applications is due to file descriptors and sockets
|
bugs in event driven applications are due to sockets and files being
|
||||||
being opened in blocking mode. Be careful out there!
|
opened in blocking mode. Be careful out there!
|
||||||
|
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Here follows a very brief example to illustrate how one can use libuEv
|
Here follows a very brief example to illustrate how one can use libuEv
|
||||||
to act on joystick input.
|
to act upon joystick input.
|
||||||
|
|
||||||
```C
|
```C
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
@@ -179,9 +179,10 @@ libevent and libev.
|
|||||||
Build & Install
|
Build & Install
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The library is built and developed for GNU/Linux systems, as such it may
|
The library is built for and developed on GNU/Linux systems, so it may
|
||||||
use GNU GCC and GNU Make specific features. Patches to support *BSD
|
use GCC and GNU Make specific extensions here and there. This is not on
|
||||||
kqueue are most welcome.
|
purpose and patches to correct this are most welcome. Particularly
|
||||||
|
patches to support *BSD and its kqueue interface.
|
||||||
|
|
||||||
* `make all`: The library
|
* `make all`: The library
|
||||||
* `make test`: Test and showcase
|
* `make test`: Test and showcase
|
||||||
|
|||||||
Reference in new issue
Block a user