@@ -2115,15 +2115,6 @@ stream('initialHeaders', (headers) => {
2115
2115
});
2116
2116
```
2117
2117
2118
- #### Event: ` 'ready' `
2119
- <!-- YAML
2120
- added: REPLACEME
2121
- -->
2122
-
2123
- Emitted when the underlying ` QuicSession ` has emitted its ` secure ` event
2124
- this stream has received its id, which is accessible as ` stream.id ` once this
2125
- event is emitted.
2126
-
2127
2118
#### Event: ` 'trailingHeaders' `
2128
2119
<!-- YAML
2129
2120
added: REPLACEME
@@ -2158,7 +2149,10 @@ added: REPLACEME
2158
2149
2159
2150
* Type: {boolean}
2160
2151
2161
- Set to ` true ` if the ` QuicStream ` is bidirectional.
2152
+ When ` true ` , the ` QuicStream ` is bidirectional. Both the readable and
2153
+ writable sides of the ` QuicStream ` ` Duplex ` are open.
2154
+
2155
+ Read-only.
2162
2156
2163
2157
#### ` quicstream.bytesReceived `
2164
2158
<!-- YAML
@@ -2169,6 +2163,8 @@ added: REPLACEME
2169
2163
2170
2164
The total number of bytes received for this ` QuicStream ` .
2171
2165
2166
+ Read-only.
2167
+
2172
2168
#### ` quicstream.bytesSent `
2173
2169
<!-- YAML
2174
2170
added: REPLACEME
@@ -2178,24 +2174,29 @@ added: REPLACEME
2178
2174
2179
2175
The total number of bytes sent by this ` QuicStream ` .
2180
2176
2177
+ Read-only.
2178
+
2181
2179
#### ` quicstream.clientInitiated `
2182
2180
<!-- YAML
2183
2181
added: REPLACEME
2184
2182
-->
2185
2183
2186
2184
* Type: {boolean}
2187
2185
2188
- Set to ` true ` if the ` QuicStream ` was initiated by a ` QuicClientSession `
2186
+ Will be ` true ` if the ` QuicStream ` was initiated by a ` QuicClientSession `
2189
2187
instance.
2190
2188
2191
- #### ` quicstream.close(code) `
2189
+ Read-only.
2190
+
2191
+ #### ` quicstream.close() `
2192
2192
<!-- YAML
2193
2193
added: REPLACEME
2194
2194
-->
2195
2195
2196
- * ` code ` {number }
2196
+ * Returns: {Promise` }
2197
2197
2198
- Closes the ` QuicStream ` .
2198
+ Closes the ` QuicStream ` by ending both sides of the ` QuicStream ` ` Duplex ` .
2199
+ Returns a ` Promise ` that is resolved once the ` QuicStream ` has been destroyed.
2199
2200
2200
2201
#### ` quicstream.dataAckHistogram `
2201
2202
<!-- YAML
@@ -2226,6 +2227,8 @@ added: REPLACEME
2226
2227
2227
2228
The length of time the ` QuicStream ` has been active.
2228
2229
2230
+ Read-only.
2231
+
2229
2232
#### ` quicstream.finalSize `
2230
2233
<!-- YAML
2231
2234
added: REPLACEME
@@ -2235,6 +2238,8 @@ added: REPLACEME
2235
2238
2236
2239
The total number of bytes successfully received by the ` QuicStream ` .
2237
2240
2241
+ Read-only.
2242
+
2238
2243
#### ` quicstream.id `
2239
2244
<!-- YAML
2240
2245
added: REPLACEME
@@ -2244,6 +2249,8 @@ added: REPLACEME
2244
2249
2245
2250
The numeric identifier of the ` QuicStream ` .
2246
2251
2252
+ Read-only.
2253
+
2247
2254
#### ` quicstream.maxAcknowledgedOffset `
2248
2255
<!-- YAML
2249
2256
added: REPLACEME
@@ -2253,6 +2260,8 @@ added: REPLACEME
2253
2260
2254
2261
The highest acknowledged data offset received for this ` QuicStream ` .
2255
2262
2263
+ Read-only.
2264
+
2256
2265
#### ` quicstream.maxExtendedOffset `
2257
2266
<!-- YAML
2258
2267
added: REPLACEME
@@ -2262,6 +2271,8 @@ added: REPLACEME
2262
2271
2263
2272
The maximum extended data offset that has been reported to the connected peer.
2264
2273
2274
+ Read-only.
2275
+
2265
2276
#### ` quicstream.maxReceivedOffset `
2266
2277
<!-- YAML
2267
2278
added: REPLACEME
@@ -2271,6 +2282,8 @@ added: REPLACEME
2271
2282
2272
2283
The maximum received offset for this ` QuicStream ` .
2273
2284
2285
+ Read-only.
2286
+
2274
2287
#### ` quicstream.pushStream(headers\[, options\]) `
2275
2288
<!-- YAML
2276
2289
added: REPLACEME
@@ -2304,17 +2317,22 @@ added: REPLACEME
2304
2317
2305
2318
* Type: {boolean}
2306
2319
2307
- Set to ` true ` if the ` QuicStream ` was initiated by a ` QuicServerSession `
2320
+ Will be ` true ` if the ` QuicStream ` was initiated by a ` QuicServerSession `
2308
2321
instance.
2309
2322
2323
+ Read-only.
2324
+
2310
2325
#### ` quicstream.session `
2311
2326
<!-- YAML
2312
2327
added: REPLACEME
2313
2328
-->
2314
2329
2315
2330
* Type: {QuicSession}
2316
2331
2317
- The ` QuicServerSession ` or ` QuicClientSession ` .
2332
+ The ` QuicServerSession ` or ` QuicClientSession ` to which the
2333
+ ` QuicStream ` belongs.
2334
+
2335
+ Read-only.
2318
2336
2319
2337
#### ` quicstream.sendFD(fd\[, options\]) `
2320
2338
<!-- YAML
@@ -2395,7 +2413,26 @@ added: REPLACEME
2395
2413
2396
2414
* Type: {boolean}
2397
2415
2398
- Set to ` true ` if the ` QuicStream ` is unidirectional.
2416
+ Will be ` true ` if the ` QuicStream ` is undirectional. Whether the ` QuicStream `
2417
+ will be readable or writable depends on whether the ` quicstream.session ` is
2418
+ a ` QuicClientSession ` or ` QuicServerSession ` , and whether the ` QuicStream `
2419
+ was initiated locally or remotely.
2420
+
2421
+ | ` quicstream.session ` | ` quicstream.serverInitiated ` | Readable | Writable |
2422
+ | -------------------- | ---------------------------- | -------- | -------- |
2423
+ | ` QuicClientSession ` | ` true ` | Y | N |
2424
+ | ` QuicServerSession ` | ` true ` | N | Y |
2425
+ | ` QuicClientSession ` | ` false ` | N | Y |
2426
+ | ` QuicServerSession ` | ` false ` | Y | N |
2427
+
2428
+ | ` quicstream.session ` | ` quicstream.clientInitiated ` | Readable | Writable |
2429
+ | -------------------- | ---------------------------- | -------- | -------- |
2430
+ | ` QuicClientSession ` | ` true ` | N | Y |
2431
+ | ` QuicServerSession ` | ` true ` | Y | N |
2432
+ | ` QuicClientSession ` | ` false ` | Y | N |
2433
+ | ` QuicServerSession ` | ` false ` | N | Y |
2434
+
2435
+ Read-only.
2399
2436
2400
2437
## Additional notes
2401
2438
0 commit comments