badeend opened PR #7243 from badeend:udp-streams to bytecodealliance:main:
Introduce new
inbound-datagram-streamandoutbound-datagram-streamtypes and movedreceiveandsendmethods to those respectively. These streams are returned bybindand can be individually subscribed to. This resolves a design issue where a UDP server would end up in a spin loop becausereceivereturned EWOULDBLOCK but poll_* always returned immediately because the socket was ready for sending. In this new setup, users can poll each direction separately. Fixes https://github.com/WebAssembly/wasi-sockets/issues/64Additionally
- Enable send-like behaviour by making
outbound-datagram::remote-addressoptional. Fixes https://github.com/WebAssembly/wasi-sockets/pull/57- Dropped the
networkparameter from theconnectcall, becausebindis now _required_ to perform IO.
badeend requested alexcrichton for a review on PR #7243.
badeend requested wasmtime-core-reviewers for a review on PR #7243.
badeend updated PR #7243.
badeend updated PR #7243.
badeend updated PR #7243.
alexcrichton submitted PR review:
Looks great to me, thanks again for this!
badeend updated PR #7243.
alexcrichton merged PR #7243.
Last updated: Dec 13 2025 at 19:03 UTC