http: add comment about outputSize in res/server

PR-URL: https://github.com/nodejs/node/pull/3128
This commit is contained in:
Fedor Indutny authored and Rod Vagg committed 2015-10-06 07:03:39 +11:00
1 parent 820735d967
commit 59cb053394
2 files changed
+11

No files matched your search

+4
View File
@@ -265,6 +265,10 @@ function connectionListener(socket) {
var outgoingData = 0;
function updateOutgoingData(delta) {
// `outgoingData` is an approximate amount of bytes queued through all
// inactive responses. If more data than the high watermark is queued - we
// need to pause TCP socket/HTTP parser, and wait until the data will be
// sent to the client.
outgoingData += delta;
if (socket._paused && outgoingData < socket._writableState.highWaterMark)
return socketOnDrain();