On Sun, Jan 20, 2013 at 6:31 AM, Josh Erickson <
josh.s...@gmail.com> wrote:
> I've been poking and playing with around node and tried doing some IPv6
> multicasting, but it fails with an ENOSYS. So i decided to do something
> about it.
>
> Since this is a hack and paste (partly as I've had a baby in my arm much of
> the day), as well as an exercise to teach myself more about low level
> programming and things like gyp, ant feed back is much appreciated,
>
> One of the things I'm not sure about is if the creating
> uv_udp_set_membership6 is a good idea. Much more so the decision to
> magically upgrade calls to uv_udp_set_membership if ipv6 is being used, Most
> of my reasoning is that to have one, requires a lot of variables that aren't
> used epending on th ip version. Doing it this way, I think it saves tiny
> amounts of memory (feel free to correct this if I'm wrong), but magically
> upgrades existing code.
>
>
https://github.com/snoj/libuv/commit/af5ff21e13a89f65ba3a45a8433eed37d6b250f4
>
> The test test-udp-multicast-join6.c is basically test-udp-multicast-join.c,
> but aimed at ipv6 instead. On this Windows 8 laptop, the test passes,
>
> Thank you!
Hi, Josh. If you want to get your changes reviewed, can you submit
them as a pull request?
One thing I noticed is that it's only implemented on Windows
(uncommon, usually it's the other way around). It should at the very
least have Unix stubs that set UV_ENOSYS.
Another thing is that it may conflict with [1] ("pass structs by
address, not value"). That's not a blocker in itself, we can fix up
and consolidate the multicast API afterwards, but perhaps something to
keep in mind.
[1]
https://github.com/joyent/libuv/issues/684