aggregateBytes static method

Uint8List aggregateBytes(
  1. List<ClientMessage> messages, {
  2. required Encoding encoding,
})

Implementation

static Uint8List aggregateBytes(List<ClientMessage> messages,
    {required Encoding encoding}) {
  final buffer = PgByteDataWriter(encoding: encoding);
  for (final cm in messages) {
    cm.applyToBuffer(buffer);
  }
  return buffer.toBytes();
}