From 73806f2e552cfad5815bdd7758838d5e6313a314 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Sat, 27 Apr 2024 08:24:42 -0400 Subject: [PATCH 1/5] comment sentence structure --- imports.md | 4 ++-- wit/tcp.wit | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/imports.md b/imports.md index 45ff953..512453c 100644 --- a/imports.md +++ b/imports.md @@ -1210,7 +1210,7 @@ occured.

  • connected
  • closed See https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md -for a more information.
  • +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. @@ -1700,7 +1700,7 @@ in progress at the time of calling subscribe (if any). Theoreticall 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.

    +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.

    Params
    diff --git a/wit/tcp.wit b/wit/tcp.wit index 5902b9e..310b509 100644 --- a/wit/tcp.wit +++ b/wit/tcp.wit @@ -27,8 +27,8 @@ interface tcp { /// - `connect-in-progress` /// - `connected` /// - `closed` - /// See - /// for a more information. + /// See + /// 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*. @@ -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 - /// for a more information. + /// See + /// 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. From a05347dd90c31fa75b2d63a3a87d1e0ba630c652 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Sat, 27 Apr 2024 08:26:33 -0400 Subject: [PATCH 2/5] consistent number of blank lines --- wit/network.wit | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wit/network.wit b/wit/network.wit index 9cadf06..cee7cb3 100644 --- a/wit/network.wit +++ b/wit/network.wit @@ -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, @@ -77,7 +76,6 @@ interface network { /// The remote address is not reachable remote-unreachable, - /// The TCP connection was forcefully rejected connection-refused, @@ -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, From fa56272319d03f8742f94a7cecc2e898c2d6042b Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Sat, 27 Apr 2024 08:27:37 -0400 Subject: [PATCH 3/5] fix `connected` name in comment --- wit/tcp.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/tcp.wit b/wit/tcp.wit index 310b509..a96e182 100644 --- a/wit/tcp.wit +++ b/wit/tcp.wit @@ -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` From 9d2b72cbdb37c399c090e742ffd3253597f47fe7 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Sat, 27 Apr 2024 08:28:13 -0400 Subject: [PATCH 4/5] slight sentence structure adjustment --- wit/tcp.wit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wit/tcp.wit b/wit/tcp.wit index a96e182..9aa79bd 100644 --- a/wit/tcp.wit +++ b/wit/tcp.wit @@ -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. From 710a1a0d9dfecc2296652d841eb97922ce4f201b Mon Sep 17 00:00:00 2001 From: Dave Bakker Date: Mon, 13 May 2024 20:06:41 +0200 Subject: [PATCH 5/5] Regenerate imports.md --- imports.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imports.md b/imports.md index 512453c..6716d29 100644 --- a/imports.md +++ b/imports.md @@ -1209,7 +1209,7 @@ occured.

  • connect-in-progress
  • connected
  • closed -See https://github.com/WebAssembly/wasi-sockets/TcpSocketOperationalSemantics.md +See https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md for more information.
  • Note: Except where explicitly mentioned, whenever this documentation uses @@ -1279,7 +1279,7 @@ don't want to make use of this ability can simply call the native

    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 @@ -1699,7 +1699,7 @@ their success or failure, after which the method can be retried.

    in progress at the time of calling subscribe (if any). Theoretically, 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 +

    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.

    @@ -1722,7 +1722,7 @@ this method will be discarded. 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.

    Typical errors