Closed diclophis closed 7 years ago
Also of interest is these two documents
http://docs.libuv.org/en/v1.x/udp.html#c.uv_udp_bind
http://docs.libuv.org/en/v1.x/tcp.html#c.uv_tcp_bind
It looks like udp_bind
was already OK... but somehow that refactor never made it to the TCP half of things
Thanks for the patch! Just FYI, I'm about to release version 3 of this GEM with major improvements!
https://github.com/cotag/libuv/tree/seamless
Just finishing up some related GEMs however it is otherwise ready for release.
If you clone that branch, gem build libuv.gemspec
and install you can check it out. Can't emphasize enough how much better it is.
Wait, I'd already merged that branch into master
so if you build the current master manually it's much better
@stakach this fixes an issue when
bind/listen
ing multiple TCP servers in the same reactor loop...Without this fix, multiple calls to
a_tcp_server.bind
results in undefined / error behavior, in particular thecatch
loop on the server receives this message"invalid argument, EINVAL:-22","Libuv::Error::EINVAL"
I think this error might only be an issue in particular on Linux platforms, as for the most part I have not seen this issue on OSX.
I plan to submit a test along with this patch, but I need to get this pushed and and integrated into my project sooner than later...