Skip to content

Commit 0031520

Browse files
committed
Small improvements to startTls section.
1 parent d6d419d commit 0031520

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

index.bs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,22 @@ following circumstances:
127127

128128
It can also be rejected with an exception under the following circumstances:
129129

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
132132

133133

134134
`startTls` method {#starttls-method}
135135
------------------------------------
136136

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).
139140

140141
<div class="note">
141142
The `startTls` method must fail with an exception if the `secureTransport` option set on
142143
socket instance it was called on is not equal to "starttls".
143144
</div>
144145

145-
146-
147146
In this `secureTransport` mode of operation the socket begins the
148147
connection in plain-text, with messages read and written without any encryption. Then once the
149148
`startTls` method is called on the socket, the following shall take place:
@@ -163,6 +162,14 @@ let tlsSock = sock.startTls();
163162
```
164163
</aside>
165164

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+
166173
`connect` method {#connect}
167174
===========================
168175

@@ -232,6 +239,8 @@ The `connect` method performs the following steps:
232239
<dfn>allowHalfOpen</dfn> member
233240
</dt>
234241
<dd>
242+
This option is similar to that offered by the Node.js `net` module and allows interoperability
243+
with code which utilizes it.
235244
<dl>
236245
<dt>false</dt>
237246
<dd>The WritableStream- and the socket instance- will be automatically closed when a

0 commit comments

Comments
 (0)