… | |
… | |
3663 | 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 |
3664 | 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, |
3665 | 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 |
3666 | on win32. Should not be defined on non-win32 platforms. |
3666 | on win32. Should not be defined on non-win32 platforms. |
3667 | |
3667 | |
3668 | =item EV_FD_TO_WIN32_HANDLE |
3668 | =item EV_FD_TO_WIN32_HANDLE(fd) |
3669 | |
3669 | |
3670 | 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 |
3671 | file descriptors to socket handles. When not defining this symbol (the |
3671 | file descriptors to socket handles. When not defining this symbol (the |
3672 | default), then libev will call C<_get_osfhandle>, which is usually |
3672 | default), then libev will call C<_get_osfhandle>, which is usually |
3673 | correct. In some cases, programs use their own file descriptor management, |
3673 | correct. In some cases, programs use their own file descriptor management, |
3674 | 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. |
3675 | |
3689 | |
3676 | =item EV_USE_POLL |
3690 | =item EV_USE_POLL |
3677 | |
3691 | |
3678 | 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) |
3679 | backend. Otherwise it will be enabled on non-win32 platforms. It |
3693 | backend. Otherwise it will be enabled on non-win32 platforms. It |