From 4b0f5af82893c1791d97721160f61749ec04a30c Mon Sep 17 00:00:00 2001 From: Anthony Champagne Date: Sun, 4 Feb 2024 22:16:07 +0100 Subject: [PATCH] update package description & README --- README.md | 14 ++++++++------ pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a55205a..e8a1ab4 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ -# A simple stateless Internet Connectivity Checker +# A simple, cancellable and stateless Internet Connectivity Checker An Internet Connectivity Checker : + - Which can test single or multiple endpoints (with configurable concurrency), - Which do not depends on any protocol (uses Dart's socket connection), - Which is cancellable and support both global and per endpoint timeouts, - Which keep it simple. It is stateless. -**This package is not meant to be used with Flutter on the Web** +This package is not meant to be used with Flutter on the Web (check *Internet Connection Check for Flutter on the Web* below for alternatives). If you search for a stateful Internet Connectivity Checker, check out these packages : + - [ac_connectivity](https://pub.dev/packages/ac_connectivity) - [internet_connection_checker](https://pub.dev/packages/internet_connection_checker) - [internet_connection_checker_plus](https://pub.dev/packages/internet_connection_checker_plus) @@ -58,9 +60,9 @@ final isConnected = await checker.cancelableOperation.value; ## Which endpoints to use? -If you want to test for an Internet connection, you might as well want to use the endpoints that are the less-likely to be down. +If you want to test for an Internet connection, you might as well want to use the endpoints that are the less-likely to be down. -The plugin provides the list of all the IPv4 and IPv6 addresses for the [root name servers](https://www.internic.net/domain/named.root). +The plugin provides the list of all the IPv4 and IPv6 addresses for the [root name servers](https://www.internic.net/domain/named.root). Be-aware that it is more than likely that your application will have to be compatible with both IPv4-only and IPv6-only network. My advice is to mix and randomize those two lists and use the concurrent connectivity checker to test for an Internet connection. @@ -75,7 +77,7 @@ final endpoints = [ For testing Internet connection for Flutter Web, I recommended that you either use the [connectivity_plus](https://pub.dev/packages/connectivity_plus) plugin : -```dart +```dart import 'package:connectivity_plus/connectivity_plus.dart'; final result = await Connectivity().checkConnectivity(); @@ -114,4 +116,4 @@ if (state == InetConnectivityState.disconnected) { Connectivity().listen((state) { // on Internet connectivity state changes }); -``` \ No newline at end of file +``` diff --git a/pubspec.yaml b/pubspec.yaml index 9508f48..bac0dbf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: ac_inet_connectivity_checker -description: A simple stateless Internet connectivity checker which do not depend on any protocol +description: A simple, cancellable and stateless Internet connectivity checker which do not depend on any protocol version: 0.1.2 repository: https://github.com/anthochamp/dart-inet-connectivity-checker