fromBytes static method

MtuProbeFrame fromBytes(
  1. ByteData view,
  2. int offset
)
override

The probe is the rest of the packet: its type byte and the padding after it. (Reading it as one byte left the padding to be parsed as a thousand PADDING frames.)

Implementation

static MtuProbeFrame fromBytes(ByteData view, int offset) {
  return MtuProbeFrame(probeSize: view.lengthInBytes - offset);
}