diff --git a/imports.md b/imports.md index 45ff953..6716d29 100644 --- a/imports.md +++ b/imports.md @@ -1209,8 +1209,8 @@ occured.

  • 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. @@ -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:

    After a failed connection attempt, the socket will be in the closed @@ -1699,8 +1699,8 @@ 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 -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.

    Params
    @@ -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

    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, diff --git a/wit/tcp.wit b/wit/tcp.wit index 5902b9e..9aa79bd 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*. @@ -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` @@ -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. @@ -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.