Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 983de33

Browse files
authored
Merge pull request #101 from FrankReh/comments
Documentation updates
2 parents f2ffc74 + 710a1a0 commit 983de33

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

imports.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,8 @@ occured.</p>
12091209
<li><code>connect-in-progress</code></li>
12101210
<li><code>connected</code></li>
12111211
<li><code>closed</code>
1212-
See <a href="https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md">https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md</a>
1213-
for a more information.</li>
1212+
See <a href="https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md">https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md</a>
1213+
for more information.</li>
12141214
</ul>
12151215
<p>Note: Except where explicitly mentioned, whenever this documentation uses
12161216
the term &quot;bound&quot; without backticks it actually means: in the <code>bound</code> state <em>or higher</em>.
@@ -1279,7 +1279,7 @@ don't want to make use of this ability can simply call the native
12791279
<p>Connect to a remote endpoint.</p>
12801280
<p>On success:</p>
12811281
<ul>
1282-
<li>the socket is transitioned into the <code>connection</code> state.</li>
1282+
<li>the socket is transitioned into the <code>connected</code> state.</li>
12831283
<li>a pair of streams is returned that can be used to read &amp; write to the connection</li>
12841284
</ul>
12851285
<p>After a failed connection attempt, the socket will be in the <code>closed</code>
@@ -1699,8 +1699,8 @@ their success or failure, after which the method can be retried.</p>
16991699
in progress at the time of calling <code>subscribe</code> (if any). Theoretically,
17001700
<code>subscribe</code> only has to be called once per socket and can then be
17011701
(re)used for the remainder of the socket's lifetime.</p>
1702-
<p>See <a href="https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md#Pollable-readiness">https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md#Pollable-readiness</a>
1703-
for a more information.</p>
1702+
<p>See <a href="https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness">https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness</a>
1703+
for more information.</p>
17041704
<p>Note: this function is here for WASI Preview2 only.
17051705
It's planned to be removed when <code>future</code> is natively supported in Preview3.</p>
17061706
<h5>Params</h5>
@@ -1722,7 +1722,7 @@ this method will be discarded.</li>
17221722
associated with this socket will be closed and a FIN packet will be sent.</li>
17231723
<li><code>both</code>: Same effect as <code>receive</code> &amp; <code>send</code> combined.</li>
17241724
</ul>
1725-
<p>This function is idempotent. Shutting a down a direction more than once
1725+
<p>This function is idempotent; shutting down a direction more than once
17261726
has no effect and returns <code>ok</code>.</p>
17271727
<p>The shutdown function does not close (drop) the socket.</p>
17281728
<h1>Typical errors</h1>

wit/network.wit

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ interface network {
6161
/// Note: this is scheduled to be removed when `future`s are natively supported.
6262
would-block,
6363

64-
6564
/// The operation is not valid in the socket's current state.
6665
invalid-state,
6766

@@ -77,7 +76,6 @@ interface network {
7776
/// The remote address is not reachable
7877
remote-unreachable,
7978

80-
8179
/// The TCP connection was forcefully rejected
8280
connection-refused,
8381

@@ -87,12 +85,10 @@ interface network {
8785
/// A TCP connection was aborted.
8886
connection-aborted,
8987

90-
9188
/// The size of a datagram sent to a UDP socket exceeded the maximum
9289
/// supported size.
9390
datagram-too-large,
9491

95-
9692
/// Name does not exist or has no suitable associated IP addresses.
9793
name-unresolvable,
9894

wit/tcp.wit

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ interface tcp {
2727
/// - `connect-in-progress`
2828
/// - `connected`
2929
/// - `closed`
30-
/// See <https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md>
31-
/// for a more information.
30+
/// See <https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md>
31+
/// for more information.
3232
///
3333
/// Note: Except where explicitly mentioned, whenever this documentation uses
3434
/// the term "bound" without backticks it actually means: in the `bound` state *or higher*.
@@ -82,7 +82,7 @@ interface tcp {
8282
/// Connect to a remote endpoint.
8383
///
8484
/// On success:
85-
/// - the socket is transitioned into the `connection` state.
85+
/// - the socket is transitioned into the `connected` state.
8686
/// - a pair of streams is returned that can be used to read & write to the connection
8787
///
8888
/// After a failed connection attempt, the socket will be in the `closed`
@@ -318,8 +318,8 @@ interface tcp {
318318
/// `subscribe` only has to be called once per socket and can then be
319319
/// (re)used for the remainder of the socket's lifetime.
320320
///
321-
/// See <https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md#Pollable-readiness>
322-
/// for a more information.
321+
/// See <https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness>
322+
/// for more information.
323323
///
324324
/// Note: this function is here for WASI Preview2 only.
325325
/// It's planned to be removed when `future` is natively supported in Preview3.
@@ -335,7 +335,7 @@ interface tcp {
335335
/// associated with this socket will be closed and a FIN packet will be sent.
336336
/// - `both`: Same effect as `receive` & `send` combined.
337337
///
338-
/// This function is idempotent. Shutting a down a direction more than once
338+
/// This function is idempotent; shutting down a direction more than once
339339
/// has no effect and returns `ok`.
340340
///
341341
/// The shutdown function does not close (drop) the socket.

0 commit comments

Comments
 (0)