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
/// - the socket is transitioned into the Connection state
58
61
/// - a pair of streams is returned that can be used to read & write to the connection
59
62
///
60
-
/// POSIX mentions:
61
-
/// > If connect() fails, the state of the socket is unspecified. Conforming applications should
62
-
/// > close the file descriptor and create a new socket before attempting to reconnect.
63
-
///
64
-
/// WASI prescribes the following behavior:
65
-
/// - If `connect` fails because an input/state validation error, the socket should remain usable.
66
-
/// - If a connection was actually attempted but failed, the socket should become unusable for further network communication.
67
-
/// Besides `drop`, any method after such a failure may return an error.
63
+
/// After a failed connection attempt, the only valid action left is to
64
+
/// `drop` the socket. A single socket can not be used to connect more than once.
68
65
///
69
66
/// # Typical `start` errors
70
67
/// - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT)
71
68
/// - `invalid-argument`: `remote-address` is not a unicast address. (EINVAL, ENETUNREACH on Linux, EAFNOSUPPORT on MacOS)
72
-
/// - `invalid-argument`: `remote-address` is an IPv4-mapped IPv6 address, but the socket has `ipv6-only` enabled. (EINVAL, EADDRNOTAVAIL on Illumos)
73
-
/// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa)
69
+
/// - `invalid-argument`: `remote-address` is an IPv4-mapped IPv6 address. (EINVAL, EADDRNOTAVAIL on Illumos)
74
70
/// - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EADDRNOTAVAIL on Windows)
75
71
/// - `invalid-argument`: The port in `remote-address` is set to 0. (EADDRNOTAVAIL on Windows)
76
72
/// - `invalid-argument`: The socket is already attached to a different network. The `network` passed to `connect` must be identical to the one passed to `bind`.
@@ -125,7 +121,6 @@ interface tcp {
125
121
///
126
122
/// The returned socket is bound and in the Connection state. The following properties are inherited from the listener socket:
127
123
/// - `address-family`
128
-
/// - `ipv6-only`
129
124
/// - `keep-alive-enabled`
130
125
/// - `keep-alive-idle-time`
131
126
/// - `keep-alive-interval`
@@ -190,17 +185,6 @@ interface tcp {
190
185
/// Equivalent to the SO_DOMAIN socket option.
191
186
address-family:func() ->ip-address-family;
192
187
193
-
/// Whether IPv4 compatibility (dual-stack) mode is disabled or not.
194
-
///
195
-
/// Equivalent to the IPV6_V6ONLY socket option.
196
-
///
197
-
/// # Typical errors
198
-
/// - `invalid-state`: (set) The socket is already bound.
199
-
/// - `not-supported`: (get/set) `this` socket is an IPv4 socket.
200
-
/// - `not-supported`: (set) Host does not support dual-stack sockets. (Implementations are not required to.)
Copy file name to clipboardExpand all lines: wit/deps/sockets/udp.wit
-13Lines changed: 0 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,6 @@ interface udp {
92
92
///
93
93
/// # Typical errors
94
94
/// - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT)
95
-
/// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa)
96
95
/// - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EDESTADDRREQ, EADDRNOTAVAIL)
97
96
/// - `invalid-argument`: The port in `remote-address` is set to 0. (EDESTADDRREQ, EADDRNOTAVAIL)
98
97
/// - `invalid-state`: The socket is not bound.
@@ -142,17 +141,6 @@ interface udp {
142
141
/// Equivalent to the SO_DOMAIN socket option.
143
142
address-family:func() ->ip-address-family;
144
143
145
-
/// Whether IPv4 compatibility (dual-stack) mode is disabled or not.
146
-
///
147
-
/// Equivalent to the IPV6_V6ONLY socket option.
148
-
///
149
-
/// # Typical errors
150
-
/// - `not-supported`: (get/set) `this` socket is an IPv4 socket.
151
-
/// - `invalid-state`: (set) The socket is already bound.
152
-
/// - `not-supported`: (set) Host does not support dual-stack sockets. (Implementations are not required to.)
/// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options.
157
145
///
158
146
/// If the provided value is 0, an `invalid-argument` error is returned.
@@ -248,7 +236,6 @@ interface udp {
248
236
///
249
237
/// # Typical errors
250
238
/// - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT)
251
-
/// - `invalid-argument`: `remote-address` is a non-IPv4-mapped IPv6 address, but the socket was bound to a specific IPv4-mapped IPv6 address. (or vice versa)
252
239
/// - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EDESTADDRREQ, EADDRNOTAVAIL)
253
240
/// - `invalid-argument`: The port in `remote-address` is set to 0. (EDESTADDRREQ, EADDRNOTAVAIL)
254
241
/// - `invalid-argument`: The socket is in "connected" mode and `remote-address` is `some` value that does not match the address passed to `stream`. (EISCONN)
0 commit comments