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
{{ message }}
Repository navigation
No socket options after creation (setNoDelay, setKeepAlive) blocks Perry's node:net #34
Perry's P1 migration (node:net on turnloop) cannot implement socket.setNoDelay(), setKeepAlive() or the other post-creation socket options: turnloop accepts nodelay only in ConnectOpts at creation, ListenOpts has no such field at all, and there is no API to change an option on a live handle.
Node exposes these as methods on a connected socket, and servers commonly call setNoDelay(true) per accepted connection, so an accepted turnloop socket cannot be configured at all today.
Expected: a typed, backend-neutral socket-option API on Loop, for example set_option(handle, SocketOption) with a small enum (NoDelay, KeepAlive { idle, interval, count }, ReuseAddr at bind time, Linger, RecvBufferSize, SendBufferSize, Ipv6Only, Broadcast, multicast joins for UDP), returning Unsupported per backend where the platform has no equivalent.
Also needed: options on accepted sockets (the listener's defaults should not be the only choice), and ListenOpts should carry the accepted-socket defaults it can apply cheaply.
Verification: per option, assert the change is visible through the OS (getsockopt), and that behaviour changes where observable (for example NoDelay on a small-write round trip). Native Linux/macOS/Windows; WASI 0.2/0.3 where wasi:sockets exposes the option, Unsupported otherwise; web Unsupported.
Implemented in #36 (merged 909e92f): Loop::set_option/get_option with 12 option variants, plus ListenOpts::accept_defaults applied after the OS accept and before the Accepted completion. Per-backend support matrix and the Unsupported cases are in docs/lanes/sockopts.md and DESIGN §7.7. Verified through independent getsockopt probes (including a dup'd-socket cross-check), a behavioural Linger(0) reset test, and the full Windows/Linux/WASI/web CI matrix.
Activity
Socket options on live handles and accept defaults (#34) (#36)
proggeramlug commentedon Sep 15, 2026
Implemented in #36 (merged 909e92f):
Loop::set_option/get_optionwith 12 option variants, plusListenOpts::accept_defaultsapplied after the OS accept and before theAcceptedcompletion. Per-backend support matrix and theUnsupportedcases are indocs/lanes/sockopts.mdand DESIGN §7.7. Verified through independentgetsockoptprobes (including a dup'd-socket cross-check), a behaviouralLinger(0)reset test, and the full Windows/Linux/WASI/web CI matrix.