BeginResp.fromBytes constructor

BeginResp.fromBytes(
  1. Uint8List data
)

Implementation

factory BeginResp.fromBytes(Uint8List data) {
  if (!_isValidSize(data)) {
    throw IncorrectMessageSizeException();
  }
  return BeginResp(
    packageSize: bytesToUint32(data, _packageSizeOffset),
    bufferSize: bytesToUint32(data, _bufferSizeOffset),
  );
}