@@ -127,23 +127,22 @@ following circumstances:
127
127
128
128
It can also be rejected with an exception under the following circumstances:
129
129
130
- * a socket connection could not be established, either because it was rejected explicitly or due to
131
- a transient issue with the runtime
130
+ * a socket connection could not be established, either because the address/port combo requested is
131
+ blocked or due to a transient issue with the runtime
132
132
133
133
134
134
`startTls` method {#starttls-method}
135
135
------------------------------------
136
136
137
- The <dfn>`startTls` method</dfn> enables opportunistic TLS which is a requirement for some protocols
138
- (primarily postgres/mysql and other DB protocols).
137
+ The <dfn>`startTls` method</dfn> enables opportunistic TLS (otherwise known as
138
+ [StartTLS] (https://en.wikipedia.org/wiki/Opportunistic_TLS)) which is a requirement for some
139
+ protocols (primarily postgres/mysql and other DB protocols).
139
140
140
141
<div class="note">
141
142
The `startTls` method must fail with an exception if the `secureTransport` option set on
142
143
socket instance it was called on is not equal to "starttls".
143
144
</div>
144
145
145
-
146
-
147
146
In this `secureTransport` mode of operation the socket begins the
148
147
connection in plain-text, with messages read and written without any encryption. Then once the
149
148
`startTls` method is called on the socket, the following shall take place:
@@ -163,6 +162,14 @@ let tlsSock = sock.startTls();
163
162
```
164
163
</aside>
165
164
165
+ The original readers and writers based off the original socket will no longer work. You must create
166
+ new readers and writers from the new socket returned by `startTls`.
167
+
168
+ <div class="note">
169
+ The `startTls` method must fail with an exception if called on a TLS socket (i.e. one returned
170
+ by the `startTls` call)
171
+ </div>
172
+
166
173
`connect` method {#connect}
167
174
===========================
168
175
@@ -232,6 +239,8 @@ The `connect` method performs the following steps:
232
239
<dfn>allowHalfOpen</dfn> member
233
240
</dt>
234
241
<dd>
242
+ This option is similar to that offered by the Node.js `net` module and allows interoperability
243
+ with code which utilizes it.
235
244
<dl>
236
245
<dt> false</dt>
237
246
<dd> The WritableStream- and the socket instance- will be automatically closed when a
0 commit comments