chargeTotal method

bool chargeTotal(
  1. int bytes
)

Charges bytes held by another layer to the connection total only; false, and nothing charged, when they would cross it.

Implementation

bool chargeTotal(int bytes) {
  final totalLimit = limitTotalBytes;
  if (totalLimit != null && _total + bytes > totalLimit) return false;
  _total += bytes;
  return true;
}