You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bikallem
changed the title
luv: Eio.Net.listen and datagram_socket ignores reuse_addr and reuse_port parameter
reuse_addr and reuse_port parameters are ignored in luv
Nov 9, 2022
Eio.Net.listen
anddatagram_socket
functions ignorereuse_addr
andreuse_port
parameter in luv backend (https://github.com/ocaml-multicore/eio/blob/main/lib_eio_luv/eio_luv.ml#L753-L754).Some observations on luv backend:
it seems libuv creates tcp sockets with
reuse_addr = true
by default (https://github.com/libuv/libuv/blob/7bccb562e415030050cfbd1e69eeefd69ce57aca/src/unix/tcp.c#L164). Therefore ifreuse_addr = false
we need to set the socket option explicitly.For udp sockets, it seems to be
reuse_addr=false
by default. (https://github.com/libuv/libuv/blob/dff3f8ccabee15b1545523329e39e7acd2e77563/src/win/udp.c#L221)The text was updated successfully, but these errors were encountered: