encodeSelfCapacity method

  1. @override
int encodeSelfCapacity()

Returns an estimated maximum number of bytes required for encoding.

Implementation

@override
int encodeSelfCapacity() {
  var optionsLength = options.encodeSelfCapacity();
  while (optionsLength % 4 != 0) {
    optionsLength++;
  }
  return 20 + optionsLength + payload.encodeSelfCapacity();
}