Skip to content

Commit

Permalink
Merge pull request #101 from FrankReh/comments
Browse files Browse the repository at this point in the history
Documentation updates
  • Loading branch information
badeend authored May 13, 2024
2 parents f2ffc74 + 710a1a0 commit 983de33
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
12 changes: 6 additions & 6 deletions imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -1209,8 +1209,8 @@ occured.</p>
<li><code>connect-in-progress</code></li>
<li><code>connected</code></li>
<li><code>closed</code>
See <a href="https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md">https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md</a>
for a more information.</li>
See <a href="https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md">https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md</a>
for more information.</li>
</ul>
<p>Note: Except where explicitly mentioned, whenever this documentation uses
the term &quot;bound&quot; without backticks it actually means: in the <code>bound</code> state <em>or higher</em>.
Expand Down Expand Up @@ -1279,7 +1279,7 @@ don't want to make use of this ability can simply call the native
<p>Connect to a remote endpoint.</p>
<p>On success:</p>
<ul>
<li>the socket is transitioned into the <code>connection</code> state.</li>
<li>the socket is transitioned into the <code>connected</code> state.</li>
<li>a pair of streams is returned that can be used to read &amp; write to the connection</li>
</ul>
<p>After a failed connection attempt, the socket will be in the <code>closed</code>
Expand Down Expand Up @@ -1699,8 +1699,8 @@ their success or failure, after which the method can be retried.</p>
in progress at the time of calling <code>subscribe</code> (if any). Theoretically,
<code>subscribe</code> only has to be called once per socket and can then be
(re)used for the remainder of the socket's lifetime.</p>
<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>
for a more information.</p>
<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>
for more information.</p>
<p>Note: this function is here for WASI Preview2 only.
It's planned to be removed when <code>future</code> is natively supported in Preview3.</p>
<h5>Params</h5>
Expand All @@ -1722,7 +1722,7 @@ this method will be discarded.</li>
associated with this socket will be closed and a FIN packet will be sent.</li>
<li><code>both</code>: Same effect as <code>receive</code> &amp; <code>send</code> combined.</li>
</ul>
<p>This function is idempotent. Shutting a down a direction more than once
<p>This function is idempotent; shutting down a direction more than once
has no effect and returns <code>ok</code>.</p>
<p>The shutdown function does not close (drop) the socket.</p>
<h1>Typical errors</h1>
Expand Down
4 changes: 0 additions & 4 deletions wit/network.wit
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ interface network {
/// Note: this is scheduled to be removed when `future`s are natively supported.
would-block,


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

Expand All @@ -77,7 +76,6 @@ interface network {
/// The remote address is not reachable
remote-unreachable,


/// The TCP connection was forcefully rejected
connection-refused,

Expand All @@ -87,12 +85,10 @@ interface network {
/// A TCP connection was aborted.
connection-aborted,


/// The size of a datagram sent to a UDP socket exceeded the maximum
/// supported size.
datagram-too-large,


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

Expand Down
12 changes: 6 additions & 6 deletions wit/tcp.wit
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ interface tcp {
/// - `connect-in-progress`
/// - `connected`
/// - `closed`
/// See <https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md>
/// for a more information.
/// See <https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md>
/// for more information.
///
/// Note: Except where explicitly mentioned, whenever this documentation uses
/// the term "bound" without backticks it actually means: in the `bound` state *or higher*.
Expand Down Expand Up @@ -82,7 +82,7 @@ interface tcp {
/// Connect to a remote endpoint.
///
/// On success:
/// - the socket is transitioned into the `connection` state.
/// - the socket is transitioned into the `connected` state.
/// - a pair of streams is returned that can be used to read & write to the connection
///
/// After a failed connection attempt, the socket will be in the `closed`
Expand Down Expand Up @@ -318,8 +318,8 @@ interface tcp {
/// `subscribe` only has to be called once per socket and can then be
/// (re)used for the remainder of the socket's lifetime.
///
/// See <https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md#Pollable-readiness>
/// for a more information.
/// See <https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness>
/// for more information.
///
/// Note: this function is here for WASI Preview2 only.
/// It's planned to be removed when `future` is natively supported in Preview3.
Expand All @@ -335,7 +335,7 @@ interface tcp {
/// associated with this socket will be closed and a FIN packet will be sent.
/// - `both`: Same effect as `receive` & `send` combined.
///
/// This function is idempotent. Shutting a down a direction more than once
/// This function is idempotent; shutting down a direction more than once
/// has no effect and returns `ok`.
///
/// The shutdown function does not close (drop) the socket.
Expand Down

0 comments on commit 983de33

Please sign in to comment.