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.
Perry's P1 migration (
node:neton turnloop) cannot implementsocket.setNoDelay(),setKeepAlive()or the other post-creation socket options: turnloop acceptsnodelayonly inConnectOptsat creation,ListenOptshas 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 exampleset_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), returningUnsupportedper backend where the platform has no equivalent.Also needed: options on accepted sockets (the listener's defaults should not be the only choice), and
ListenOptsshould 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 exampleNoDelayon a small-write round trip). Native Linux/macOS/Windows; WASI 0.2/0.3 wherewasi:socketsexposes the option,Unsupportedotherwise; webUnsupported.