Skip to content

Commit cdf57e5

Browse files
Ethan Arrowooddom96
authored andcommitted
specify pending state
1 parent 0b9e5af commit cdf57e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ A socket becomes <i>closed</i> when its {{close()}} method is called. A socket c
4444

4545
A socket can be constructed using a <dfn export id="connect-concept">connect</dfn> method defined in a `sockets` module (early implementations may use `vendor:sockets` for the module name), or defined on a [=binding object=].
4646

47-
The connect method is the primary mechanism for creating a [=socket=] instance. It instantiates a socket with a resource identifier and some configuration values. It should synchronously return a socket instance in a <i>connected</i> state (or an error should be thrown).
47+
The connect method is the primary mechanism for creating a [=socket=] instance. It instantiates a socket with a resource identifier and some configuration values. It should synchronously return a socket instance in a <i>pending</i> state (or an error should be thrown). The socket will asynchronously <i>connect</i> depending on the implementation.
4848

4949
<h3 id="binding-object-concept">Binding Object</h3>
5050

@@ -262,9 +262,9 @@ interface Connect {
262262
The {{connect()}} method performs the following steps:
263263

264264
<ol>
265-
<li>A connection is established to the specified {{SocketAddress}} asynchronously.</li>
266265
<li>New {{Socket}} instance is created with each of its attributes initialised immediately.</li>
267-
<li>The created {{Socket}} instance is returned immediately.</li>
266+
<li>The created {{Socket}} instance is returned immediately in a <i>pending</i> state.</li>
267+
<li>A connection is established to the specified {{SocketAddress}} asynchronously.</li>
268268
<li>If the connection fails for any reason, the socket's {{closed}} promise is rejected with a [=SocketError=] describing why the connection failed.</li>
269269
<li>The instance's {{ReadableStream}} and {{WritableStream}} streams can be used immediately.</li>
270270
</ol>

0 commit comments

Comments
 (0)