AlphaXSseParser constructor

AlphaXSseParser({
  1. int maxLineLength = 1024 * 1024,
  2. int maxEventDataLength = 8 * 1024 * 1024,
})

Creates a parser with generous bounded line and event-data buffers.

Implementation

AlphaXSseParser({
  this.maxLineLength = 1024 * 1024,
  this.maxEventDataLength = 8 * 1024 * 1024,
}) {
  if (maxLineLength <= 0) {
    throw ArgumentError.value(maxLineLength, 'maxLineLength', 'Must be positive');
  }
  if (maxEventDataLength <= 0) {
    throw ArgumentError.value(maxEventDataLength, 'maxEventDataLength', 'Must be positive');
  }
}