Skip to content

Commit 3e5c224

Browse files
committed
Add note about exceptions in connect.
1 parent 0031520 commit 3e5c224

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ The `connect` method performs the following steps:
206206
<li>The instance's {{ReadableStream}} and {{WritableStream}} streams can be used immediately.</li>
207207
</ol>
208208

209+
At any point during the creation of the {{Socket}} instance, `connect` may throw an exception. One
210+
case where this can happen is if the input address is incorrectly formatted.
211+
Errors which occur asynchronously- after the socket instance has been returned- must reject the
212+
socket's `closed` promise.
213+
209214
<div class="note">
210215
The implementation may consider blocking connections to certain hostname/port combinations which can
211216
pose a threat of abuse or security vulnerability.
@@ -215,6 +220,8 @@ The `connect` method performs the following steps:
215220
</div>
216221

217222

223+
224+
218225
`SocketOptions` dictionary
219226
---------------------------
220227

0 commit comments

Comments
 (0)