Stream data sender now reacts to connection delay. It will buffer requests when the delay is high.

This commit is contained in:
NI
2019-12-29 13:57:27 +08:00
parent 8b4e406fa9
commit 2861664f4a
2 changed files with 24 additions and 1 deletions

View File

@@ -41,6 +41,16 @@ export class Sender {
this.bufferReq = 0;
}
/**
* Set the send delay of current sender
*
* @param {integer} newDelay the new delay
*
*/
setDelay(newDelay) {
this.bufferFlushDelay = newDelay;
}
/**
* Sends data to the this.sender
*