- From: Taylor Brandstetter via GitHub <sysbot+gh@w3.org>
- Date: Mon, 02 Apr 2018 23:53:00 +0000
- To: public-webrtc-logs@w3.org
> But I want to know whether there's a particular reason why it needs to be that way
Because then you can reliably check `bufferedAmount` to avoid calling `send` when the buffered amount is above some threshold. It guarantees that `bufferedAmount` is always greater than or equal to the actual buffered amount.
For example:
```
while (haveDataToSend()) {
if (dc.bufferedAmount > bufferFullThreshold) {
// bufferedamountlow event will cause us to resume sending.
break;
} else {
dc.send(getChunkToSend());
}
}
```
--
GitHub Notification of comment by taylor-b
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1823#issuecomment-378083997 using your GitHub account
Received on Monday, 2 April 2018 23:53:07 UTC