@torrent-tv/proxy 2.87.11 → 2.87.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/routes/api/playback-plan/audio-tracks/post.js +29 -29
- package/routes/api/sources/warm/post.js +217 -217
- package/routes/api/transcode-sessions/post.js +13 -0
- package/server.js +725 -725
- package/services/encode/EncodeAdmission.js +45 -1
- package/services/encode/OutputOpening.js +4 -1
- package/services/encode/quality/EncodeCost.js +31 -0
- package/services/encode/quality/output-format.js +58 -9
- package/services/media/audio-inventory.js +245 -245
- package/services/server/ViewerRequests.js +25 -1
- package/services/server/controllers/PlaybackController.js +40 -40
- package/services/server/wire-outputs.js +3 -0
- package/services/torrent/torrent-pool.js +2675 -2675
- package/services/torrent/worker/client.js +765 -765
- package/services/torrent/worker/pool-adapter.js +365 -365
- package/services/torrent/worker/protocol.js +184 -184
- package/services/torrent/worker/worker.js +1129 -1129
- package/services/transport/data-channel-handler.js +1369 -1369
- package/services/viewer/Viewer.js +8 -1
- package/test/audio-inventory.test.js +212 -212
- package/test/data-channel-viewer-lifecycle.test.js +92 -92
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Message protocol between the main thread and the torrent worker.
|
|
3
|
-
*
|
|
4
|
-
* **Why the torrent gets its own thread.** Profiling the live proxy during a
|
|
5
|
-
* seek (2026-08-02) found the main thread ~85% busy, and busy with WebTorrent:
|
|
6
|
-
* buffer concatenation in `uint8-util` ~15%, `_updateWire` and its wrapper ~9%,
|
|
7
|
-
* garbage collection ~5% — and no piece hashing anywhere, which had been the
|
|
8
|
-
* standing assumption. Serving a segment shares that thread, so reading an
|
|
9
|
-
* already-finished 10 MB file off SSD took 12-23 s while handing it to the
|
|
10
|
-
* channel took 125 ms. Two unrelated jobs — one talking to fifty peers in small
|
|
11
|
-
* bursts, one owing a viewer a prompt answer — were queued behind each other
|
|
12
|
-
* for no reason but sharing a thread. Three of the four cores sat idle.
|
|
13
|
-
*
|
|
14
|
-
* **Why this shape, measured rather than assumed** (see the numbers below):
|
|
15
|
-
*
|
|
16
|
-
* | approach | 10 MB |
|
|
17
|
-
* |--------------------------------------------|---------|
|
|
18
|
-
* | structured clone (copying) | 37 ms |
|
|
19
|
-
* | transferable `ReadableStream` (the standard)| 104 ms |
|
|
20
|
-
* | **this: transfer inside a stream wrapper** | **4.8 ms** |
|
|
21
|
-
* | one whole buffer, no chunking | 0.49 ms |
|
|
22
|
-
*
|
|
23
|
-
* The standard transferable stream is the obvious choice and the wrong one: it
|
|
24
|
-
* negotiates every chunk across the boundary and costs 22x this design. Copying
|
|
25
|
-
* is worse still. So the worker transfers ownership of large buffers, and the
|
|
26
|
-
* main thread wraps the arriving buffers in an ordinary `ReadableStream` —
|
|
27
|
-
* standard interface outside, ownership transfer inside. Callers cannot tell
|
|
28
|
-
* the difference; the cost is a tenth of a percent of a segment's playing time.
|
|
29
|
-
*
|
|
30
|
-
* Chunk size follows from the same measurements: a round trip costs ~100 µs, so
|
|
31
|
-
* 64 KB chunks would spend 13 ms per segment on overhead against 0.5 ms sent
|
|
32
|
-
* whole. {@link STREAM_CHUNK_BYTES} of 1 MB puts a 10 MB segment at ten
|
|
33
|
-
* messages — about 1 ms — while still allowing a read to be cancelled promptly
|
|
34
|
-
* and keeping peak memory bounded.
|
|
35
|
-
*
|
|
36
|
-
* Torrent objects cannot cross a thread boundary, so the main thread names them
|
|
37
|
-
* by `sourceKey` (the identifier the registry already uses) and the worker owns
|
|
38
|
-
* the objects.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Commands sent main thread → worker.
|
|
43
|
-
*
|
|
44
|
-
* @readonly
|
|
45
|
-
* @enum {string}
|
|
46
|
-
*/
|
|
47
|
-
export const Command = {
|
|
48
|
-
/** Add (or join) a torrent; resolves when metadata is ready. */
|
|
49
|
-
ADD_SOURCE: "add-source",
|
|
50
|
-
/** File list and metadata for a source. */
|
|
51
|
-
LIST_FILES: "list-files",
|
|
52
|
-
/** Live download figures for the progress display. */
|
|
53
|
-
FILE_STATS: "file-stats",
|
|
54
|
-
/** Bytes every torrent here has moved, for pricing the torrent's own cost. */
|
|
55
|
-
TORRENT_TOTALS: "torrent-totals",
|
|
56
|
-
/** Which films this proxy holds right now, for content affinity. */
|
|
57
|
-
HELD_TORRENTS: "held-torrents",
|
|
58
|
-
/** Reorder piece selection around a read position (seek prioritisation). */
|
|
59
|
-
PRIORITIZE: "prioritize",
|
|
60
|
-
/**
|
|
61
|
-
* The priority map for one file: seconds of film against a number.
|
|
62
|
-
*
|
|
63
|
-
* What anybody wants and in what order, stated once by the side that knows
|
|
64
|
-
* where the viewers are. The download decides what to fetch and what to keep
|
|
65
|
-
* from this, instead of from the windows the reads themselves used to
|
|
66
|
-
* declare — fifteen reads declaring fifteen windows on a store that holds
|
|
67
|
-
* sixteen pieces is what tore a film apart on 2026-09-05.
|
|
68
|
-
*/
|
|
69
|
-
PRIORITY_MAP: "priority-map",
|
|
70
|
-
/** Read a byte range; the body arrives as CHUNK messages. */
|
|
71
|
-
READ_RANGE: "read-range",
|
|
72
|
-
/** Abandon an in-flight READ_RANGE (viewer gone, seek superseded). */
|
|
73
|
-
CANCEL_READ: "cancel-read",
|
|
74
|
-
/** Pre-fetch the head and tail a codec probe needs. */
|
|
75
|
-
PREFETCH_EDGES: "prefetch-edges",
|
|
76
|
-
/**
|
|
77
|
-
* Fetch one whole file using only the room the viewer's own reading leaves —
|
|
78
|
-
* a soundtrack or subtitle file they may switch to later. Returns as soon as
|
|
79
|
-
* the work is under way.
|
|
80
|
-
*/
|
|
81
|
-
FILL_FILE: "fill-file",
|
|
82
|
-
/** Claim every remaining file as conditional TAIL demand for one torrent. */
|
|
83
|
-
FILL_TORRENT: "fill-torrent",
|
|
84
|
-
/**
|
|
85
|
-
* Start fetching the region a viewer is about to resume at, named in seconds
|
|
86
|
-
* and turned into bytes here, where the file's own duration can be read.
|
|
87
|
-
*/
|
|
88
|
-
WARM_POSITION: "warm-position",
|
|
89
|
-
/**
|
|
90
|
-
* The byte ranges of one file the torrent holds WHOLE, so the subtitle walk
|
|
91
|
-
* can decide what it may read without asking the swarm. A list rather than a
|
|
92
|
-
* question per cluster: a pass asks about every cluster of the file, and
|
|
93
|
-
* hundreds of round trips for a walk meant to be free when there is nothing
|
|
94
|
-
* new would be the cost of the split, not of the work.
|
|
95
|
-
*/
|
|
96
|
-
HELD_RANGES: "held-ranges",
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Bytes of a range the torrent already holds, read from the store and never
|
|
100
|
-
* fetched. The ordinary range read declares demand and steers the swarm,
|
|
101
|
-
* which is right for a viewer waiting on a segment and wrong for a walk that
|
|
102
|
-
* must pull nothing.
|
|
103
|
-
*/
|
|
104
|
-
READ_HELD: "read-held",
|
|
105
|
-
|
|
106
|
-
/** Shut the client down, optionally deleting downloaded data. */
|
|
107
|
-
/**
|
|
108
|
-
* How much disk the spilled pieces may take between them.
|
|
109
|
-
*
|
|
110
|
-
* Sent from the main thread, because the disk has one owner and this store is
|
|
111
|
-
* not its only user: the segments an encoder produces are on the same disk,
|
|
112
|
-
* and a ceiling one of two users sets for itself is not a ceiling. The worker
|
|
113
|
-
* divides its share between the stores it holds.
|
|
114
|
-
*/
|
|
115
|
-
SPILL_ALLOWANCE: "spill-allowance",
|
|
116
|
-
WHOLE_FILES_ALLOWANCE: "whole-files-allowance",
|
|
117
|
-
MEMORY_ALLOWANCE: "memory-allowance",
|
|
118
|
-
DESTROY_ALL: "destroy-all"
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Messages sent worker → main thread.
|
|
123
|
-
*
|
|
124
|
-
* @readonly
|
|
125
|
-
* @enum {string}
|
|
126
|
-
*/
|
|
127
|
-
export const Event = {
|
|
128
|
-
/** A command completed; carries its result. */
|
|
129
|
-
RESULT: "result",
|
|
130
|
-
/** A command failed; carries a message (`Error`s do not survive the boundary). */
|
|
131
|
-
ERROR: "error",
|
|
132
|
-
/** One piece of a READ_RANGE body; its bytes are transferred, never copied. */
|
|
133
|
-
CHUNK: "chunk",
|
|
134
|
-
/**
|
|
135
|
-
* Where a piece of the body sits in the torrent's shared pool — an offset and
|
|
136
|
-
* a length, no bytes at all. The main thread maps the same memory and reads it
|
|
137
|
-
* in place; see `piece-reader.js` for why this replaces sending the bytes.
|
|
138
|
-
*/
|
|
139
|
-
FRAGMENT: "fragment",
|
|
140
|
-
/**
|
|
141
|
-
* The main thread has finished with a FRAGMENT and its pin may be dropped.
|
|
142
|
-
* Distinct from {@link CHUNK_ACK}, which only reports queue capacity: this one
|
|
143
|
-
* is a promise that nothing is reading those bytes any more.
|
|
144
|
-
*/
|
|
145
|
-
FRAGMENT_DONE: "fragment-done",
|
|
146
|
-
/** A READ_RANGE ended; no further CHUNKs bear that request id. */
|
|
147
|
-
READ_END: "read-end",
|
|
148
|
-
/** The main thread consumed a chunk — see {@link STREAM_HIGH_WATER_CHUNKS}. */
|
|
149
|
-
CHUNK_ACK: "chunk-ack",
|
|
150
|
-
/** A log line, so worker output reaches the same place as everything else. */
|
|
151
|
-
LOG: "log",
|
|
152
|
-
/**
|
|
153
|
-
* Pieces of these files have arrived.
|
|
154
|
-
*
|
|
155
|
-
* ANNOUNCED, not asked: the torrent is the only thing that knows a piece just
|
|
156
|
-
* verified, and what anybody does about it — walk a subtitle track's new
|
|
157
|
-
* clusters, say — is no business of this thread. It used to walk them itself,
|
|
158
|
-
* which put the cue reading in the thread that owns the swarm.
|
|
159
|
-
*/
|
|
160
|
-
PIECES_ARRIVED: "pieces-arrived",
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* A file has been downloaded whole and written out as a file.
|
|
164
|
-
*
|
|
165
|
-
* The main thread serves it from disk after this, without asking this thread
|
|
166
|
-
* for anything: an ordinary read of an ordinary file, with no piece store
|
|
167
|
-
* between them and nothing that can refuse it for want of memory.
|
|
168
|
-
*/
|
|
169
|
-
FILE_COMPLETE: "file-complete"
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Bytes per CHUNK message. See the file header for why 1 MB.
|
|
174
|
-
*/
|
|
175
|
-
export const STREAM_CHUNK_BYTES = 1024 * 1024;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* How many chunks may be in flight before the worker waits for an acknowledgement.
|
|
179
|
-
*
|
|
180
|
-
* Unbounded sending would let a fast disk outrun the channel and rebuild, in the
|
|
181
|
-
* message queue, exactly the memory the transfers were saving. Two in flight
|
|
182
|
-
* keeps the pipe full without letting it grow.
|
|
183
|
-
*/
|
|
184
|
-
export const STREAM_HIGH_WATER_CHUNKS = 2;
|
|
1
|
+
/**
|
|
2
|
+
* @file Message protocol between the main thread and the torrent worker.
|
|
3
|
+
*
|
|
4
|
+
* **Why the torrent gets its own thread.** Profiling the live proxy during a
|
|
5
|
+
* seek (2026-08-02) found the main thread ~85% busy, and busy with WebTorrent:
|
|
6
|
+
* buffer concatenation in `uint8-util` ~15%, `_updateWire` and its wrapper ~9%,
|
|
7
|
+
* garbage collection ~5% — and no piece hashing anywhere, which had been the
|
|
8
|
+
* standing assumption. Serving a segment shares that thread, so reading an
|
|
9
|
+
* already-finished 10 MB file off SSD took 12-23 s while handing it to the
|
|
10
|
+
* channel took 125 ms. Two unrelated jobs — one talking to fifty peers in small
|
|
11
|
+
* bursts, one owing a viewer a prompt answer — were queued behind each other
|
|
12
|
+
* for no reason but sharing a thread. Three of the four cores sat idle.
|
|
13
|
+
*
|
|
14
|
+
* **Why this shape, measured rather than assumed** (see the numbers below):
|
|
15
|
+
*
|
|
16
|
+
* | approach | 10 MB |
|
|
17
|
+
* |--------------------------------------------|---------|
|
|
18
|
+
* | structured clone (copying) | 37 ms |
|
|
19
|
+
* | transferable `ReadableStream` (the standard)| 104 ms |
|
|
20
|
+
* | **this: transfer inside a stream wrapper** | **4.8 ms** |
|
|
21
|
+
* | one whole buffer, no chunking | 0.49 ms |
|
|
22
|
+
*
|
|
23
|
+
* The standard transferable stream is the obvious choice and the wrong one: it
|
|
24
|
+
* negotiates every chunk across the boundary and costs 22x this design. Copying
|
|
25
|
+
* is worse still. So the worker transfers ownership of large buffers, and the
|
|
26
|
+
* main thread wraps the arriving buffers in an ordinary `ReadableStream` —
|
|
27
|
+
* standard interface outside, ownership transfer inside. Callers cannot tell
|
|
28
|
+
* the difference; the cost is a tenth of a percent of a segment's playing time.
|
|
29
|
+
*
|
|
30
|
+
* Chunk size follows from the same measurements: a round trip costs ~100 µs, so
|
|
31
|
+
* 64 KB chunks would spend 13 ms per segment on overhead against 0.5 ms sent
|
|
32
|
+
* whole. {@link STREAM_CHUNK_BYTES} of 1 MB puts a 10 MB segment at ten
|
|
33
|
+
* messages — about 1 ms — while still allowing a read to be cancelled promptly
|
|
34
|
+
* and keeping peak memory bounded.
|
|
35
|
+
*
|
|
36
|
+
* Torrent objects cannot cross a thread boundary, so the main thread names them
|
|
37
|
+
* by `sourceKey` (the identifier the registry already uses) and the worker owns
|
|
38
|
+
* the objects.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Commands sent main thread → worker.
|
|
43
|
+
*
|
|
44
|
+
* @readonly
|
|
45
|
+
* @enum {string}
|
|
46
|
+
*/
|
|
47
|
+
export const Command = {
|
|
48
|
+
/** Add (or join) a torrent; resolves when metadata is ready. */
|
|
49
|
+
ADD_SOURCE: "add-source",
|
|
50
|
+
/** File list and metadata for a source. */
|
|
51
|
+
LIST_FILES: "list-files",
|
|
52
|
+
/** Live download figures for the progress display. */
|
|
53
|
+
FILE_STATS: "file-stats",
|
|
54
|
+
/** Bytes every torrent here has moved, for pricing the torrent's own cost. */
|
|
55
|
+
TORRENT_TOTALS: "torrent-totals",
|
|
56
|
+
/** Which films this proxy holds right now, for content affinity. */
|
|
57
|
+
HELD_TORRENTS: "held-torrents",
|
|
58
|
+
/** Reorder piece selection around a read position (seek prioritisation). */
|
|
59
|
+
PRIORITIZE: "prioritize",
|
|
60
|
+
/**
|
|
61
|
+
* The priority map for one file: seconds of film against a number.
|
|
62
|
+
*
|
|
63
|
+
* What anybody wants and in what order, stated once by the side that knows
|
|
64
|
+
* where the viewers are. The download decides what to fetch and what to keep
|
|
65
|
+
* from this, instead of from the windows the reads themselves used to
|
|
66
|
+
* declare — fifteen reads declaring fifteen windows on a store that holds
|
|
67
|
+
* sixteen pieces is what tore a film apart on 2026-09-05.
|
|
68
|
+
*/
|
|
69
|
+
PRIORITY_MAP: "priority-map",
|
|
70
|
+
/** Read a byte range; the body arrives as CHUNK messages. */
|
|
71
|
+
READ_RANGE: "read-range",
|
|
72
|
+
/** Abandon an in-flight READ_RANGE (viewer gone, seek superseded). */
|
|
73
|
+
CANCEL_READ: "cancel-read",
|
|
74
|
+
/** Pre-fetch the head and tail a codec probe needs. */
|
|
75
|
+
PREFETCH_EDGES: "prefetch-edges",
|
|
76
|
+
/**
|
|
77
|
+
* Fetch one whole file using only the room the viewer's own reading leaves —
|
|
78
|
+
* a soundtrack or subtitle file they may switch to later. Returns as soon as
|
|
79
|
+
* the work is under way.
|
|
80
|
+
*/
|
|
81
|
+
FILL_FILE: "fill-file",
|
|
82
|
+
/** Claim every remaining file as conditional TAIL demand for one torrent. */
|
|
83
|
+
FILL_TORRENT: "fill-torrent",
|
|
84
|
+
/**
|
|
85
|
+
* Start fetching the region a viewer is about to resume at, named in seconds
|
|
86
|
+
* and turned into bytes here, where the file's own duration can be read.
|
|
87
|
+
*/
|
|
88
|
+
WARM_POSITION: "warm-position",
|
|
89
|
+
/**
|
|
90
|
+
* The byte ranges of one file the torrent holds WHOLE, so the subtitle walk
|
|
91
|
+
* can decide what it may read without asking the swarm. A list rather than a
|
|
92
|
+
* question per cluster: a pass asks about every cluster of the file, and
|
|
93
|
+
* hundreds of round trips for a walk meant to be free when there is nothing
|
|
94
|
+
* new would be the cost of the split, not of the work.
|
|
95
|
+
*/
|
|
96
|
+
HELD_RANGES: "held-ranges",
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Bytes of a range the torrent already holds, read from the store and never
|
|
100
|
+
* fetched. The ordinary range read declares demand and steers the swarm,
|
|
101
|
+
* which is right for a viewer waiting on a segment and wrong for a walk that
|
|
102
|
+
* must pull nothing.
|
|
103
|
+
*/
|
|
104
|
+
READ_HELD: "read-held",
|
|
105
|
+
|
|
106
|
+
/** Shut the client down, optionally deleting downloaded data. */
|
|
107
|
+
/**
|
|
108
|
+
* How much disk the spilled pieces may take between them.
|
|
109
|
+
*
|
|
110
|
+
* Sent from the main thread, because the disk has one owner and this store is
|
|
111
|
+
* not its only user: the segments an encoder produces are on the same disk,
|
|
112
|
+
* and a ceiling one of two users sets for itself is not a ceiling. The worker
|
|
113
|
+
* divides its share between the stores it holds.
|
|
114
|
+
*/
|
|
115
|
+
SPILL_ALLOWANCE: "spill-allowance",
|
|
116
|
+
WHOLE_FILES_ALLOWANCE: "whole-files-allowance",
|
|
117
|
+
MEMORY_ALLOWANCE: "memory-allowance",
|
|
118
|
+
DESTROY_ALL: "destroy-all"
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Messages sent worker → main thread.
|
|
123
|
+
*
|
|
124
|
+
* @readonly
|
|
125
|
+
* @enum {string}
|
|
126
|
+
*/
|
|
127
|
+
export const Event = {
|
|
128
|
+
/** A command completed; carries its result. */
|
|
129
|
+
RESULT: "result",
|
|
130
|
+
/** A command failed; carries a message (`Error`s do not survive the boundary). */
|
|
131
|
+
ERROR: "error",
|
|
132
|
+
/** One piece of a READ_RANGE body; its bytes are transferred, never copied. */
|
|
133
|
+
CHUNK: "chunk",
|
|
134
|
+
/**
|
|
135
|
+
* Where a piece of the body sits in the torrent's shared pool — an offset and
|
|
136
|
+
* a length, no bytes at all. The main thread maps the same memory and reads it
|
|
137
|
+
* in place; see `piece-reader.js` for why this replaces sending the bytes.
|
|
138
|
+
*/
|
|
139
|
+
FRAGMENT: "fragment",
|
|
140
|
+
/**
|
|
141
|
+
* The main thread has finished with a FRAGMENT and its pin may be dropped.
|
|
142
|
+
* Distinct from {@link CHUNK_ACK}, which only reports queue capacity: this one
|
|
143
|
+
* is a promise that nothing is reading those bytes any more.
|
|
144
|
+
*/
|
|
145
|
+
FRAGMENT_DONE: "fragment-done",
|
|
146
|
+
/** A READ_RANGE ended; no further CHUNKs bear that request id. */
|
|
147
|
+
READ_END: "read-end",
|
|
148
|
+
/** The main thread consumed a chunk — see {@link STREAM_HIGH_WATER_CHUNKS}. */
|
|
149
|
+
CHUNK_ACK: "chunk-ack",
|
|
150
|
+
/** A log line, so worker output reaches the same place as everything else. */
|
|
151
|
+
LOG: "log",
|
|
152
|
+
/**
|
|
153
|
+
* Pieces of these files have arrived.
|
|
154
|
+
*
|
|
155
|
+
* ANNOUNCED, not asked: the torrent is the only thing that knows a piece just
|
|
156
|
+
* verified, and what anybody does about it — walk a subtitle track's new
|
|
157
|
+
* clusters, say — is no business of this thread. It used to walk them itself,
|
|
158
|
+
* which put the cue reading in the thread that owns the swarm.
|
|
159
|
+
*/
|
|
160
|
+
PIECES_ARRIVED: "pieces-arrived",
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* A file has been downloaded whole and written out as a file.
|
|
164
|
+
*
|
|
165
|
+
* The main thread serves it from disk after this, without asking this thread
|
|
166
|
+
* for anything: an ordinary read of an ordinary file, with no piece store
|
|
167
|
+
* between them and nothing that can refuse it for want of memory.
|
|
168
|
+
*/
|
|
169
|
+
FILE_COMPLETE: "file-complete"
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Bytes per CHUNK message. See the file header for why 1 MB.
|
|
174
|
+
*/
|
|
175
|
+
export const STREAM_CHUNK_BYTES = 1024 * 1024;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* How many chunks may be in flight before the worker waits for an acknowledgement.
|
|
179
|
+
*
|
|
180
|
+
* Unbounded sending would let a fast disk outrun the channel and rebuild, in the
|
|
181
|
+
* message queue, exactly the memory the transfers were saving. Two in flight
|
|
182
|
+
* keeps the pipe full without letting it grow.
|
|
183
|
+
*/
|
|
184
|
+
export const STREAM_HIGH_WATER_CHUNKS = 2;
|