Imgkl / EventFlux

A Dart package for efficient handling of server-sent event streams with easy connectivity and data management.
https://pub.dev/packages/eventflux
MIT License
25 stars 8 forks source link

Added Reconnect logic #17

Closed Imgkl closed 5 months ago

Imgkl commented 5 months ago

Now the devs can have granular control for reconnect logic.

closes #7

ReconnectConfig(
        mode = ReconnectMode.linear || ReconnectMode.exponential,
        interval = Duration(seconds: 5),
        maxAttempts = 5 // or -1 for infinite,
        onReconnect = () {
          // Things to execute when reconnect happens
        }
    ),