readPacketLength static method

int readPacketLength(
  1. Uint8List packet
)

Returns the length field of the packet. This is the number of bytes following the length field except for the MAC. packet can be partitial.

Implementation

static int readPacketLength(Uint8List packet) {
  return ByteData.sublistView(packet).getUint32(0);
}