Skip to content

Commit 9019a6e

Browse files
committed
Add comments, remove warning from VideoStreamerChunked.js
1 parent ac131dc commit 9019a6e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

examples/VideoStreamerChunked.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/* This is an example stressing the Chunked transfer mode */
2+
/* It is not the most optimal way to send lots of data, tryEnd is */
3+
/* If you do not know the size of the file, this Chunked transfer mode
4+
* is necessary. We send 256kb chunks and wait for them to drain. The
5+
* max backpressure is thus 256 kb. Again, tryEnd is more efficient if
6+
* you know the file size. The call "end" with a huge file is the worst
7+
* possible way, as it copies the entire file to backpressure. */
8+
19
const uWS = require('uWebSockets.js');
210
const fs = require('fs');
311

@@ -17,7 +25,6 @@ function getFileView(name) {
1725
const videoView = getFileView(fileName);
1826
const totalSize = videoView.byteLength;
1927

20-
console.log('WARNING: NEVER DO LIKE THIS; WILL CAUSE HORRIBLE BACKPRESSURE!');
2128
console.log('Video size is: ' + totalSize + ' bytes');
2229

2330
const CHUNK_SIZE = 1024 * 256;

0 commit comments

Comments
 (0)