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

Comparing libev/ev.pod (file contents):
Revision 1.165 by root, Sun Jun 1 01:13:59 2008 UTC vs.
Revision 1.167 by root, Mon Jun 9 14:11:30 2008 UTC

2626libev. EV is developed together with libev. Apart from the EV core module, 2626libev. EV is developed together with libev. Apart from the EV core module,
2627there are additional modules that implement libev-compatible interfaces 2627there are additional modules that implement libev-compatible interfaces
2628to C<libadns> (C<EV::ADNS>), C<Net::SNMP> (C<Net::SNMP::EV>) and the 2628to C<libadns> (C<EV::ADNS>), C<Net::SNMP> (C<Net::SNMP::EV>) and the
2629C<libglib> event core (C<Glib::EV> and C<EV::Glib>). 2629C<libglib> event core (C<Glib::EV> and C<EV::Glib>).
2630 2630
2631It can be found and installed via CPAN, its homepage is found at 2631It can be found and installed via CPAN, its homepage is at
2632L<http://software.schmorp.de/pkg/EV>. 2632L<http://software.schmorp.de/pkg/EV>.
2633
2634=item Python
2635
2636Python bindings can be found at L<http://code.google.com/p/pyev/>. It
2637seems to be quite complete and well-documented. Note, however, that the
2638patch they require for libev is outright dangerous as it breaks the ABI
2639for everybody else, and therefore, should never be applied in an installed
2640libev (if python requires an incompatible ABI then it needs to embed
2641libev).
2633 2642
2634=item Ruby 2643=item Ruby
2635 2644
2636Tony Arcieri has written a ruby extension that offers access to a subset 2645Tony Arcieri has written a ruby extension that offers access to a subset
2637of the libev API and adds file handle abstractions, asynchronous DNS and 2646of the libev API and adds file handle abstractions, asynchronous DNS and
3317more than a hundred or so sockets, then likely it needs to use a totally 3326more than a hundred or so sockets, then likely it needs to use a totally
3318different implementation for windows, as libev offers the POSIX readiness 3327different implementation for windows, as libev offers the POSIX readiness
3319notification model, which cannot be implemented efficiently on windows 3328notification model, which cannot be implemented efficiently on windows
3320(Microsoft monopoly games). 3329(Microsoft monopoly games).
3321 3330
3331A typical way to use libev under windows is to embed it (see the embedding
3332section for details) and use the following F<evwrap.h> header file instead
3333of F<ev.h>:
3334
3335 #define EV_STANDALONE /* keeps ev from requiring config.h */
3336 #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */
3337 #define EV_STAT_ENABLE 0 /* no stat() availble */
3338
3339 #include "ev.h"
3340
3341And compile the following F<evwrap.c> file into your project (make sure
3342you do I<not> compile the F<ev.c> or any other embedded soruce files!):
3343
3344 #include "evwrap.h"
3345 #include "ev.c"
3346
3322=over 4 3347=over 4
3323 3348
3324=item The winsocket select function 3349=item The winsocket select function
3325 3350
3326The winsocket C<select> function doesn't follow POSIX in that it 3351The winsocket C<select> function doesn't follow POSIX in that it
3327requires socket I<handles> and not socket I<file descriptors> (it is 3352requires socket I<handles> and not socket I<file descriptors> (it is
3328also extremely buggy). This makes select very inefficient, and also 3353also extremely buggy). This makes select very inefficient, and also
3329requires a mapping from file descriptors to socket handles. See the 3354requires a mapping from file descriptors to socket handles (the Microsoft
3355C runtime provides the function C<_open_osfhandle> for this). See the
3330discussion of the C<EV_SELECT_USE_FD_SET>, C<EV_SELECT_IS_WINSOCKET> and 3356discussion of the C<EV_SELECT_USE_FD_SET>, C<EV_SELECT_IS_WINSOCKET> and
3331C<EV_FD_TO_WIN32_HANDLE> preprocessor symbols for more info. 3357C<EV_FD_TO_WIN32_HANDLE> preprocessor symbols for more info.
3332 3358
3333The configuration for a "naked" win32 using the Microsoft runtime 3359The configuration for a "naked" win32 using the Microsoft runtime
3334libraries and raw winsocket select is: 3360libraries and raw winsocket select is:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines