ServerSentEventsClient constructor

ServerSentEventsClient(
  1. HttpClient client, {
  2. int maxReconnects = 3,
  3. Duration reconnectDelay = const Duration(seconds: 1),
})

Implementation

ServerSentEventsClient(this.client,
    {this.maxReconnects = 3,
    this.reconnectDelay = const Duration(seconds: 1)}) {
  if (maxReconnects < 0 || reconnectDelay < Duration.zero) {
    throw ArgumentError('Invalid SSE reconnect budget.');
  }
}