MessageHeader.fromParam constructor

MessageHeader.fromParam({
  1. required String command,
  2. required int bodySize,
})

constructor from params(send data).

Implementation

MessageHeader.fromParam({
  required this.command,
  required this.bodySize,
}) {
  headerSize =
      "${Sections.command.name}=$command\n${Sections.bodySize.name}=$bodySize\n"
          .length;
}