From 92881c7974fb75b79270c1c4afe11db1f1a489d1 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Wed, 12 Feb 2025 16:50:27 +0100 Subject: [PATCH] feat(0.3): make `accept` fallible `accept` is fallible, however there is currently no way to report the error to the user from the stream. Change the stream element type to `result` to account for that Ref https://www.man7.org/linux/man-pages/man2/accept.2.html Ref https://github.com/bytecodealliance/wasip3-prototyping/blob/7dbc8a9fd6a2348e772a32382c3e29c88cad397e/crates/wasi/src/p3/sockets/host/types/tcp.rs#L195-L199 Signed-off-by: Roman Volosatovs --- wit-0.3.0-draft/types.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit-0.3.0-draft/types.wit b/wit-0.3.0-draft/types.wit index b5f84d3..e0d0770 100644 --- a/wit-0.3.0-draft/types.wit +++ b/wit-0.3.0-draft/types.wit @@ -286,7 +286,7 @@ interface types { /// - /// - @since(version = 0.3.0) - listen: func() -> result, error-code>; + listen: func() -> result>, error-code>; /// Transmit data to peer. ///