ServerSentEventsClient constructor
ServerSentEventsClient(
- HttpClient client, {
- int maxReconnects = 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.');
}
}