Skip to content

Commit

Permalink
update package description & README
Browse files Browse the repository at this point in the history
  • Loading branch information
anthochamp committed Feb 4, 2024
1 parent 398e8e6 commit 4b0f5af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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.

Expand All @@ -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();
Expand Down Expand Up @@ -114,4 +116,4 @@ if (state == InetConnectivityState.disconnected) {
Connectivity().listen((state) {
// on Internet connectivity state changes
});
```
```
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 4b0f5af

Please sign in to comment.