You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,8 @@ interface Socket {
111
111
readonly attribute Promise<undefined> closed;
112
112
Promise<undefined> close(optional any reason);
113
113
114
+
readonly attribute boolean upgraded;
115
+
114
116
[NewObject] Socket startTls();
115
117
};
116
118
</pre>
@@ -205,6 +207,10 @@ It can also be rejected with a [=SocketError=] when a socket connection could no
205
207
206
208
Cancelling the socket's ReadableStream and closing the socket's WritableStream does not resolve the `closed` promise.
207
209
210
+
<h4 id="upgraded-attribute">upgraded</h4>
211
+
212
+
The {{upgraded}} attribute is a boolean flag that indicates whether the socket has been upgraded to a secure connection (using `startTLS()`).
213
+
208
214
<h3 id="methods">Methods</h3>
209
215
210
216
<h4 id="close-method">close(optional any reason)</h4>
@@ -224,6 +230,7 @@ The {{startTls()}} method enables opportunistic TLS (otherwise known as [StartTL
224
230
In this `secureTransport` mode of operation the socket begins the connection in plain-text, with messages read and written without any encryption. Then once the `startTls` method is called on the socket, the following shall take place:
225
231
226
232
<ul>
233
+
<li>the original socket "upgraded" attribute is set to true</li>
227
234
<li>the original socket is closed, though the original connection is kept alive</li>
228
235
<li>a secure TLS connection is established over that connection</li>
229
236
<li>a new socket is created and returned from the `startTls` call</li>
@@ -377,7 +384,7 @@ At any point during the creation of the {{Socket}} instance, `connect` may throw
377
384
{{alpn}} property
378
385
</dt>
379
386
<dd>
380
-
If the server agrees with one of the protocols specified in the `alpn` negotiation list, returns that protocol name as a string, otherwise `null`.
387
+
If the server agrees with one of the protocols specified in the `alpn` negotiation list, returns that protocol name as a string, otherwise `null`.
0 commit comments