badeend opened PR #7034 from badeend:set-backlog-size-before-listen to bytecodealliance:main:
Allow
set_listen_backlog_sizeto be called before listening. This enables us to pass the backlog value to the initiallistensyscall, which is more widely supported.These changes are in line with the explanation in https://github.com/WebAssembly/wasi-sockets/issues/34
badeend requested pchickey for a review on PR #7034.
badeend requested wasmtime-core-reviewers for a review on PR #7034.
badeend updated PR #7034.
badeend edited PR #7034:
- Allow
set_listen_backlog_sizeto be called before listening. This enables us to pass the backlog value to the initiallistensyscall, which is more widely supported. This is in line with the explanation in https://github.com/WebAssembly/wasi-sockets/issues/34- Silently clamp the provided backlog value, instead of failing with OutOfMemory.
alexcrichton submitted PR review:
Seems reasonable to me! I'll defer to Pat or Dan though for more specifics.
alexcrichton submitted PR review:
Seems reasonable to me! I'll defer to Pat or Dan though for more specifics.
alexcrichton created PR review comment:
To avoid repeating the definition could this be:
const DEFAULT_BACKLOG: i32 = if cfg!(target_os = "horizon") { 20 } else { 128 };
alexcrichton created PR review comment:
Or, alternatively, could the default be
None? That way we could let the OS defaults come into play if it's not otherwise specified.
pchickey requested sunfishcode for a review on PR #7034.
badeend updated PR #7034.
badeend submitted PR review.
badeend created PR review comment:
That's indeed simpler. I've update the code.
badeend updated PR #7034.
alexcrichton submitted PR review:
Apologies this fell through the cracks @badeend! If you'd like to give this a rebase I'd be happy to merge.
badeend updated PR #7034.
alexcrichton submitted PR review:
Thanks again and apologies for the delay!
alexcrichton has enabled auto merge for PR #7034.
alexcrichton has disabled auto merge for PR #7034.
badeend updated PR #7034.
alexcrichton has enabled auto merge for PR #7034.
sunfishcode submitted PR review:
Thanks!
alexcrichton merged PR #7034.
Last updated: Dec 06 2025 at 06:05 UTC