getWriteLength method

  1. @override
int getWriteLength()
override

Gets the length of the write data when WriteTo will be called. This method is overriden by the ConnectAckVariableHeader because the variable header of this message type, for some reason, contains an extra byte that is not present in the variable header spec, meaning we have to do some custom serialization and deserialization.

Implementation

@override
int getWriteLength() => 2;