ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.23 by root, Mon Nov 12 18:40:21 2007 UTC vs.
Revision 1.26 by root, Tue Nov 13 03:11:57 2007 UTC

56 56
57=over 4 57=over 4
58 58
59=item ev_tstamp ev_time () 59=item ev_tstamp ev_time ()
60 60
61Returns the current time as libev would use it. 61Returns the current time as libev would use it. Please note that the
62C<ev_now> function is usually faster and also often returns the timestamp
63you actually want to know.
62 64
63=item int ev_version_major () 65=item int ev_version_major ()
64 66
65=item int ev_version_minor () 67=item int ev_version_minor ()
66 68
241 243
242=item ev_unloop (loop, how) 244=item ev_unloop (loop, how)
243 245
244Can be used to make a call to C<ev_loop> return early (but only after it 246Can be used to make a call to C<ev_loop> return early (but only after it
245has processed all outstanding events). The C<how> argument must be either 247has processed all outstanding events). The C<how> argument must be either
246C<EVUNLOOP_ONCE>, which will make the innermost C<ev_loop> call return, or 248C<EVUNLOOP_ONE>, which will make the innermost C<ev_loop> call return, or
247C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return. 249C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return.
248 250
249=item ev_ref (loop) 251=item ev_ref (loop)
250 252
251=item ev_unref (loop) 253=item ev_unref (loop)
425required if you know what you are doing). 427required if you know what you are doing).
426 428
427You have to be careful with dup'ed file descriptors, though. Some backends 429You have to be careful with dup'ed file descriptors, though. Some backends
428(the linux epoll backend is a notable example) cannot handle dup'ed file 430(the linux epoll backend is a notable example) cannot handle dup'ed file
429descriptors correctly if you register interest in two or more fds pointing 431descriptors correctly if you register interest in two or more fds pointing
430to the same file/socket etc. description (that is, they share the same 432to the same underlying file/socket etc. description (that is, they share
431underlying "file open"). 433the same underlying "file open").
432 434
433If you must do this, then force the use of a known-to-be-good backend 435If you must do this, then force the use of a known-to-be-good backend
434(at the time of this writing, this includes only EVMETHOD_SELECT and 436(at the time of this writing, this includes only EVMETHOD_SELECT and
435EVMETHOD_POLL). 437EVMETHOD_POLL).
436 438
772 774
773=back 775=back
774 776
775=head1 LIBEVENT EMULATION 777=head1 LIBEVENT EMULATION
776 778
779Libev offers a compatibility emulation layer for libevent. It cannot
780emulate the internals of libevent, so here are some usage hints:
781
782=over 4
783
784=item * Use it by including <event.h>, as usual.
785
786=item * The following members are fully supported: ev_base, ev_callback,
787ev_arg, ev_fd, ev_res, ev_events.
788
789=item * Avoid using ev_flags and the EVLIST_*-macros, while it is
790maintained by libev, it does not work exactly the same way as in libevent (consider
791it a private API).
792
793=item * Priorities are not currently supported. Initialising priorities
794will fail and all watchers will have the same priority, even though there
795is an ev_pri field.
796
797=item * Other members are not supported.
798
799=item * The libev emulation is I<not> ABI compatible to libevent, you need
800to use the libev header file and library.
801
802=back
803
804=head1 C++ SUPPORT
805
777TBD. 806TBD.
778 807
779=head1 C++ SUPPORT
780
781TBD.
782
783=head1 AUTHOR 808=head1 AUTHOR
784 809
785Marc Lehmann <libev@schmorp.de>. 810Marc Lehmann <libev@schmorp.de>.
786 811

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines