… | |
… | |
3950 | libev sources can be compiled as C++. Therefore, code that uses the C API |
3950 | libev sources can be compiled as C++. Therefore, code that uses the C API |
3951 | will work fine. |
3951 | will work fine. |
3952 | |
3952 | |
3953 | Proper exception specifications might have to be added to callbacks passed |
3953 | Proper exception specifications might have to be added to callbacks passed |
3954 | to libev: exceptions may be thrown only from watcher callbacks, all |
3954 | to libev: exceptions may be thrown only from watcher callbacks, all |
3955 | other callbacks (allocator, syserr, loop acquire/release and periodioc |
3955 | other callbacks (allocator, syserr, loop acquire/release and periodic |
3956 | reschedule callbacks) must not throw exceptions, and might need a C<throw |
3956 | reschedule callbacks) must not throw exceptions, and might need a C<throw |
3957 | ()> specification. If you have code that needs to be compiled as both C |
3957 | ()> specification. If you have code that needs to be compiled as both C |
3958 | and C++ you can use the C<EV_THROW> macro for this: |
3958 | and C++ you can use the C<EV_THROW> macro for this: |
3959 | |
3959 | |
3960 | static void |
3960 | static void |
… | |
… | |
4238 | |
4238 | |
4239 | Brian Maher has written a partial interface to libev for lua (at the |
4239 | Brian Maher has written a partial interface to libev for lua (at the |
4240 | time of this writing, only C<ev_io> and C<ev_timer>), to be found at |
4240 | time of this writing, only C<ev_io> and C<ev_timer>), to be found at |
4241 | L<http://github.com/brimworks/lua-ev>. |
4241 | L<http://github.com/brimworks/lua-ev>. |
4242 | |
4242 | |
|
|
4243 | =item Javascript |
|
|
4244 | |
|
|
4245 | Node.js (L<http://nodejs.org>) uses libev as the underlying event library. |
|
|
4246 | |
|
|
4247 | =item Others |
|
|
4248 | |
|
|
4249 | There are others, and I stopped counting. |
|
|
4250 | |
4243 | =back |
4251 | =back |
4244 | |
4252 | |
4245 | |
4253 | |
4246 | =head1 MACRO MAGIC |
4254 | =head1 MACRO MAGIC |
4247 | |
4255 | |
… | |
… | |
4545 | |
4553 | |
4546 | If programs implement their own fd to handle mapping on win32, then this |
4554 | If programs implement their own fd to handle mapping on win32, then this |
4547 | macro can be used to override the C<close> function, useful to unregister |
4555 | macro can be used to override the C<close> function, useful to unregister |
4548 | file descriptors again. Note that the replacement function has to close |
4556 | file descriptors again. Note that the replacement function has to close |
4549 | the underlying OS handle. |
4557 | the underlying OS handle. |
|
|
4558 | |
|
|
4559 | =item EV_USE_WSASOCKET |
|
|
4560 | |
|
|
4561 | If defined to be C<1>, libev will use C<WSASocket> to create its internal |
|
|
4562 | communication socket, which works better in some environments. Otherwise, |
|
|
4563 | the normal C<socket> function will be used, which works better in other |
|
|
4564 | environments. |
4550 | |
4565 | |
4551 | =item EV_USE_POLL |
4566 | =item EV_USE_POLL |
4552 | |
4567 | |
4553 | If defined to be C<1>, libev will compile in support for the C<poll>(2) |
4568 | If defined to be C<1>, libev will compile in support for the C<poll>(2) |
4554 | backend. Otherwise it will be enabled on non-win32 platforms. It |
4569 | backend. Otherwise it will be enabled on non-win32 platforms. It |