… | |
… | |
4 | <head> |
4 | <head> |
5 | <title>libev</title> |
5 | <title>libev</title> |
6 | <meta name="description" content="Pod documentation for libev" /> |
6 | <meta name="description" content="Pod documentation for libev" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
7 | <meta name="inputfile" content="<standard input>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
8 | <meta name="outputfile" content="<standard output>" /> |
9 | <meta name="created" content="Mon Nov 12 19:49:15 2007" /> |
9 | <meta name="created" content="Mon Nov 12 20:19:59 2007" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
10 | <meta name="generator" content="Pod::Xhtml 1.57" /> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
11 | <link rel="stylesheet" href="http://res.tst.eu/pod.css"/></head> |
12 | <body> |
12 | <body> |
13 | <div class="pod"> |
13 | <div class="pod"> |
14 | <!-- INDEX START --> |
14 | <!-- INDEX START --> |
… | |
… | |
449 | descriptors to non-blocking mode is also usually a good idea (but not |
449 | descriptors to non-blocking mode is also usually a good idea (but not |
450 | required if you know what you are doing).</p> |
450 | required if you know what you are doing).</p> |
451 | <p>You have to be careful with dup'ed file descriptors, though. Some backends |
451 | <p>You have to be careful with dup'ed file descriptors, though. Some backends |
452 | (the linux epoll backend is a notable example) cannot handle dup'ed file |
452 | (the linux epoll backend is a notable example) cannot handle dup'ed file |
453 | descriptors correctly if you register interest in two or more fds pointing |
453 | descriptors correctly if you register interest in two or more fds pointing |
454 | to the same file/socket etc. description (that is, they share the same |
454 | to the same underlying file/socket etc. description (that is, they share |
455 | underlying "file open").</p> |
455 | the same underlying "file open").</p> |
456 | <p>If you must do this, then force the use of a known-to-be-good backend |
456 | <p>If you must do this, then force the use of a known-to-be-good backend |
457 | (at the time of this writing, this includes only EVMETHOD_SELECT and |
457 | (at the time of this writing, this includes only EVMETHOD_SELECT and |
458 | EVMETHOD_POLL).</p> |
458 | EVMETHOD_POLL).</p> |
459 | <dl> |
459 | <dl> |
460 | <dt>ev_io_init (ev_io *, callback, int fd, int events)</dt> |
460 | <dt>ev_io_init (ev_io *, callback, int fd, int events)</dt> |
… | |
… | |
763 | </dl> |
763 | </dl> |
764 | |
764 | |
765 | </div> |
765 | </div> |
766 | <h1 id="LIBEVENT_EMULATION">LIBEVENT EMULATION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
766 | <h1 id="LIBEVENT_EMULATION">LIBEVENT EMULATION</h1><p><a href="#TOP" class="toplink">Top</a></p> |
767 | <div id="LIBEVENT_EMULATION_CONTENT"> |
767 | <div id="LIBEVENT_EMULATION_CONTENT"> |
768 | <p>TBD.</p> |
768 | <p>Libev offers a compatibility emulation layer for libevent. It cannot |
|
|
769 | emulate the internals of libevent, so here are some usage hints:</p> |
|
|
770 | <dl> |
|
|
771 | <dt>* Use it by including <event.h>, as usual.</dt> |
|
|
772 | <dt>* The following members are fully supported: ev_base, ev_callback, |
|
|
773 | ev_arg, ev_fd, ev_res, ev_events.</dt> |
|
|
774 | <dt>* Avoid using ev_flags and the EVLIST_*-macros, while it is |
|
|
775 | maintained by libev, it does not work exactly the same way as in libevent (consider |
|
|
776 | it a private API).</dt> |
|
|
777 | <dt>* Priorities are not currently supported. Initialising priorities |
|
|
778 | will fail and all watchers will have the same priority, even though there |
|
|
779 | is an ev_pri field.</dt> |
|
|
780 | <dt>* Other members are not supported.</dt> |
|
|
781 | <dt>* The libev emulation is <i>not</i> ABI compatible to libevent, you need |
|
|
782 | to use the libev header file and library.</dt> |
|
|
783 | </dl> |
769 | |
784 | |
770 | </div> |
785 | </div> |
771 | <h1 id="C_SUPPORT">C++ SUPPORT</h1><p><a href="#TOP" class="toplink">Top</a></p> |
786 | <h1 id="C_SUPPORT">C++ SUPPORT</h1><p><a href="#TOP" class="toplink">Top</a></p> |
772 | <div id="C_SUPPORT_CONTENT"> |
787 | <div id="C_SUPPORT_CONTENT"> |
773 | <p>TBD.</p> |
788 | <p>TBD.</p> |