… | |
… | |
3407 | =item Ocaml |
3407 | =item Ocaml |
3408 | |
3408 | |
3409 | Erkki Seppala has written Ocaml bindings for libev, to be found at |
3409 | Erkki Seppala has written Ocaml bindings for libev, to be found at |
3410 | L<http://modeemi.cs.tut.fi/~flux/software/ocaml-ev/>. |
3410 | L<http://modeemi.cs.tut.fi/~flux/software/ocaml-ev/>. |
3411 | |
3411 | |
|
|
3412 | =item Lua |
|
|
3413 | |
|
|
3414 | Brian Maher has written a partial interface to libev |
|
|
3415 | for lua (only C<ev_io> and C<ev_timer>), to be found at |
|
|
3416 | L<http://github.com/brimworks/lua-ev>. |
|
|
3417 | |
3412 | =back |
3418 | =back |
3413 | |
3419 | |
3414 | |
3420 | |
3415 | =head1 MACRO MAGIC |
3421 | =head1 MACRO MAGIC |
3416 | |
3422 | |
… | |
… | |
3582 | keeps libev from including F<config.h>, and it also defines dummy |
3588 | keeps libev from including F<config.h>, and it also defines dummy |
3583 | implementations for some libevent functions (such as logging, which is not |
3589 | implementations for some libevent functions (such as logging, which is not |
3584 | supported). It will also not define any of the structs usually found in |
3590 | supported). It will also not define any of the structs usually found in |
3585 | F<event.h> that are not directly supported by the libev core alone. |
3591 | F<event.h> that are not directly supported by the libev core alone. |
3586 | |
3592 | |
3587 | In stanbdalone mode, libev will still try to automatically deduce the |
3593 | In standalone mode, libev will still try to automatically deduce the |
3588 | configuration, but has to be more conservative. |
3594 | configuration, but has to be more conservative. |
3589 | |
3595 | |
3590 | =item EV_USE_MONOTONIC |
3596 | =item EV_USE_MONOTONIC |
3591 | |
3597 | |
3592 | If defined to be C<1>, libev will try to detect the availability of the |
3598 | If defined to be C<1>, libev will try to detect the availability of the |
… | |
… | |
3657 | be used is the winsock select). This means that it will call |
3663 | be used is the winsock select). This means that it will call |
3658 | C<_get_osfhandle> on the fd to convert it to an OS handle. Otherwise, |
3664 | C<_get_osfhandle> on the fd to convert it to an OS handle. Otherwise, |
3659 | it is assumed that all these functions actually work on fds, even |
3665 | it is assumed that all these functions actually work on fds, even |
3660 | on win32. Should not be defined on non-win32 platforms. |
3666 | on win32. Should not be defined on non-win32 platforms. |
3661 | |
3667 | |
3662 | =item EV_FD_TO_WIN32_HANDLE |
3668 | =item EV_FD_TO_WIN32_HANDLE(fd) |
3663 | |
3669 | |
3664 | If C<EV_SELECT_IS_WINSOCKET> is enabled, then libev needs a way to map |
3670 | If C<EV_SELECT_IS_WINSOCKET> is enabled, then libev needs a way to map |
3665 | file descriptors to socket handles. When not defining this symbol (the |
3671 | file descriptors to socket handles. When not defining this symbol (the |
3666 | default), then libev will call C<_get_osfhandle>, which is usually |
3672 | default), then libev will call C<_get_osfhandle>, which is usually |
3667 | correct. In some cases, programs use their own file descriptor management, |
3673 | correct. In some cases, programs use their own file descriptor management, |
3668 | in which case they can provide this function to map fds to socket handles. |
3674 | in which case they can provide this function to map fds to socket handles. |
|
|
3675 | |
|
|
3676 | =item EV_WIN32_HANDLE_TO_FD(handle) |
|
|
3677 | |
|
|
3678 | If C<EV_SELECT_IS_WINSOCKET> then libev maps handles to file descriptors |
|
|
3679 | using the standard C<_open_osfhandle> function. For programs implementing |
|
|
3680 | their own fd to handle mapping, overwriting this function makes it easier |
|
|
3681 | to do so. This can be done by defining this macro to an appropriate value. |
|
|
3682 | |
|
|
3683 | =item EV_WIN32_CLOSE_FD(fd) |
|
|
3684 | |
|
|
3685 | If programs implement their own fd to handle mapping on win32, then this |
|
|
3686 | macro can be used to override the C<close> function, useful to unregister |
|
|
3687 | file descriptors again. Note that the replacement function has to close |
|
|
3688 | the underlying OS handle. |
3669 | |
3689 | |
3670 | =item EV_USE_POLL |
3690 | =item EV_USE_POLL |
3671 | |
3691 | |
3672 | If defined to be C<1>, libev will compile in support for the C<poll>(2) |
3692 | If defined to be C<1>, libev will compile in support for the C<poll>(2) |
3673 | backend. Otherwise it will be enabled on non-win32 platforms. It |
3693 | backend. Otherwise it will be enabled on non-win32 platforms. It |