diff --git a/index.bs b/index.bs index 0b7145c..e72124b 100644 --- a/index.bs +++ b/index.bs @@ -286,9 +286,11 @@ The {{connect()}} method performs the following steps:
  1. New {{Socket}} instance is created with each of its attributes initialised immediately.
  2. +
  3. The socket's {{opened}} promise is set to [=a new promise=]. Set |opened|.\[[PromiseIsHandled]] to true.
  4. The created {{Socket}} instance is returned immediately in a pending state.
  5. A connection is established to the specified {{SocketAddress}} asynchronously.
  6. -
  7. If the connection fails for any reason, the socket's {{closed}} promise is rejected with a [=SocketError=] describing why the connection failed.
  8. +
  9. Once the connection is established, set |info| to a new {{SocketInfo}}, and [=Resolve=] |opened| with |info|.
  10. +
  11. If the connection fails for any reason, the socket's {{closed}} and {{opened}} promises are rejected with a [=SocketError=] describing why the connection failed.
  12. The instance's {{ReadableStream}} and {{WritableStream}} streams can be used immediately.