fromBytes static method

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

A factory constructor to deserialize a frame from bytes.

Implementation

static MtuProbeFrame fromBytes(ByteData view, int offset) {
  // The length of the probe is the remaining length of the packet.
  // This frame should be the only one in a probe packet besides the header.
  // The actual size is determined by the packet length, not a field here.
  // We'll give it a nominal size of 1 for the type byte.
  return MtuProbeFrame(probeSize: 1);
}