From 7c2b15d7516b2ddeab964ae97971892f40949c61 Mon Sep 17 00:00:00 2001 From: Dave Bakker Date: Wed, 25 Feb 2026 16:55:02 +0100 Subject: [PATCH] Add `connection-broken` error code --- proposals/sockets/wit-0.3.0-draft/types.wit | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/proposals/sockets/wit-0.3.0-draft/types.wit b/proposals/sockets/wit-0.3.0-draft/types.wit index 9968486b..9cb8299b 100644 --- a/proposals/sockets/wit-0.3.0-draft/types.wit +++ b/proposals/sockets/wit-0.3.0-draft/types.wit @@ -70,7 +70,12 @@ interface types { /// /// POSIX equivalent: ECONNREFUSED connection-refused, - + + /// A write failed because the connection was broken. + /// + /// POSIX equivalent: EPIPE + connection-broken, + /// The connection was reset. /// /// POSIX equivalent: ECONNRESET @@ -349,6 +354,7 @@ interface types { /// # Typical errors /// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) /// - `invalid-state`: `send` has already been called on this socket. + /// - `connection-broken`: The connection is not writable anymore. (EPIPE, ECONNABORTED on Windows) /// - `connection-reset`: The connection was reset. (ECONNRESET) /// - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) ///