You can clone with
HTTPS or Subversion.
Hi, with the current master libuv, I get build errors when compiling uvwget/main.c, because the uv_poll_s struct seems to have changed again. curl_multi_socket_action(curl_handle, req->io_watcher.fd, flags, &running_handles); does not compile.
I tried to exchange the io_watcher.fd part with just socket but after that, it crashed in uv_poll_init_socket during uv__handle_init. So I guess my modification is wrong: curl_multi_socket_action(curl_handle, req->socket, flags, &running_handles);
curl_multi_socket_action(curl_handle, req->io_watcher.fd, flags, &running_handles);
curl_multi_socket_action(curl_handle, req->socket, flags, &running_handles);
Once, it was req->fd, then req->io_watcher.fd and now, it does not work anymore, again.
It would be great if somebody could give me a hint on how to adapt the example the right way. Especially on how to access the file descriptor without crashing on Windows. Is there something I forgot, which has to be done, in order to access req->socket ?
Hopefully, someone can shed some light on it. Thank you.
@clemensg I tried with the latest master and it compiles and works fine. Are you sure you're on the right branch?
Yes, I am on master..but:
This uv_poll struct is different, on Unix and Windows systems.
The io_watcher field is only defined here: https://github.com/joyent/libuv/blob/master/include/uv-private/uv-unix.h
But not in here: https://github.com/joyent/libuv/blob/master/include/uv-private/uv-win.h
For my current project, I am working on Windows, maybe this is the problem.. Hopefully, someone can help me out on how to port this to Windows or at least tell me if it's not possible with the current design of libuv.
You should not use libuv's internal fields, it will probably break again even if you fix it now.
Thanks for pointing out the platform differences.
@clemensg for now you may want to use the approach as in the test - https://github.com/joyent/libuv/blob/master/test/test-poll.c#L49 - of using another wrapper struct.
Fixed by #31