Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ private
target/
dist.tar.gz
dist
public/docs
public/docs
package-lock.json
3 changes: 1 addition & 2 deletions controllers/DownloadController.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ class DownloadController {
if(!isNaN(parseInt(req.query.bufferSize)) && (parseInt(req.query.bufferSize)<=global.maxDownloadBuffer) &&(parseInt(req.query.bufferSize)>0)){
var bufferStream = new stream.PassThrough();
bufferStream.pipe(res);
var responseBuffer = new Buffer(parseInt(req.query.bufferSize));
responseBuffer.fill(0x1020304);
var responseBuffer = global.maxBuffer.slice(0, parseInt(req.query.bufferSize))
bufferStream.write(responseBuffer);
bufferStream.end();
}
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ app.listen(5023);
app.listen(5024);
app.listen(5025);
//max download buffer size based off of download probing data
global.maxDownloadBuffer = 532421875;
global.maxDownloadBuffer = 532421875
global.maxBuffer=Buffer.allocUnsafe(global.maxDownloadBuffer).fill(0x1020304)

global.maxUploadBuffer = 10000000;

var wss = new WebSocketServer({port: webSocketPort});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"grunt-docco-multi": "0.0.4",
"grunt-tar.gz": "0.0.6",
"jasmine": "^2.5.2",
"karma": "^1.3.0",
"karma": "^3.1.4",
"karma-jasmine": "^1.0.2",
"karma-requirejs": "^1.1.0"
},
Expand Down