Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasi-sockets: New SO_REUSEADDR test #322

Closed
badeend opened this issue Dec 17, 2023 · 3 comments
Closed

wasi-sockets: New SO_REUSEADDR test #322

badeend opened this issue Dec 17, 2023 · 3 comments

Comments

@badeend
Copy link

badeend commented Dec 17, 2023

Just a heads up; I've clarified in the WITs that SO_REUSEADDR should be set on TCP sockets by default when performing an explicit bind. I've added a new test for it over in the wasmtime repo: bytecodealliance/wasmtime#7690

I don't think this requires any additional work in JCO, because libuv appears to already do this for you.

@manekinekko
Copy link
Collaborator

Thanks for the heads-up 👍

@guybedford
Copy link
Collaborator

Thanks for the clarification here. I was wondering @badeend if you had any ideas why we need to separately track the global address registrations for the test_tcp_bind_addrinuse test? If anything comes to mind would value your thoughts.

@guybedford
Copy link
Collaborator

I managed to trace the issue with the global address registration down to a Node.js low-level bindgen calling convention, with a weird workaround, where Node.js needs to call getsockname to extract bind errors, so I just followed how it is done in core to resolve this - https://github.com/nodejs/node/blob/main/lib/net.js#L1011.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants