* Add reconnectOnClose and reconnectinterval parameters in top-level WebSockets constructors.

This commit is contained in:
Tobe O 2019-02-03 14:34:00 -05:00
parent ed71ebaaeb
commit 0dbdd96e8c
4 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,6 @@
# 2.0.1
* Add `reconnectOnClose` and `reconnectinterval` parameters in top-level `WebSockets` constructors.
# 2.0.0
* Update to work with `client@2.0.0`.

View file

@ -17,7 +17,11 @@ final RegExp _straySlashes = new RegExp(r"(^/)|(/+$)");
class WebSockets extends BaseWebSocketClient {
final List<BrowserWebSocketsService> _services = [];
WebSockets(path) : super(new http.BrowserClient(), path);
WebSockets(baseUrl,
{bool reconnectOnClose = true, Duration reconnectInterval})
: super(new http.BrowserClient(), baseUrl,
reconnectOnClose: reconnectOnClose,
reconnectInterval: reconnectInterval);
@override
Future close() {

View file

@ -17,7 +17,11 @@ export 'angel_websocket.dart';
class WebSockets extends BaseWebSocketClient {
final List<WebSocketsService> _services = [];
WebSockets(String path) : super(new http.IOClient(), path);
WebSockets(baseUrl,
{bool reconnectOnClose = true, Duration reconnectInterval})
: super(new http.IOClient(), baseUrl,
reconnectOnClose: reconnectOnClose,
reconnectInterval: reconnectInterval);
@override
Stream<String> authenticateViaPopup(String url,

View file

@ -18,7 +18,11 @@ final RegExp _straySlashes = new RegExp(r"(^/)|(/+$)");
class WebSockets extends BaseWebSocketClient {
final List<IoWebSocketsService> _services = [];
WebSockets(String path) : super(new http.IOClient(), path);
WebSockets(baseUrl,
{bool reconnectOnClose = true, Duration reconnectInterval})
: super(new http.IOClient(), baseUrl,
reconnectOnClose: reconnectOnClose,
reconnectInterval: reconnectInterval);
@override
Stream<String> authenticateViaPopup(String url,