AwsConnection class

This is a singleton that can be accessed as a regular constructor ie AwsConnection always returns the same instance.

Constructors

AwsConnection()
This is a singleton that can be accessed as a regular constructor That is, AwsConnection always returns the same instance.
factory

Properties

alternateAddresses List<AwsConnectionOption>
set an alternate address list, you can set the address of a specific server.
no getter
alternateInterval Duration
Set the request interval.
no getter
connectionStatus Future<AwsConnectionStatus>
Start a request to each address. If at least one of the addresses is accessible assume there is an Internet connection available and return AwsConnectionStatus.connected. AwsConnectionStatus.disconnected otherwise.
no setter
hasConnection Future<bool>
Start a request to each address in addresses. If at least one of the addresses is accessible We assume that an Internet connection is available and return true. false otherwise.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Returns true if any listeners are attached onStatusChange.
no setter
lastTryResults List<AwsConnectionResult>
Return the results of the last check.
no setter
onStatusChange Stream<AwsConnectionStatus>
Emits an AwsConnectionStatus every 5 seconds. When all listeners are removed from onStatusChange, the internal the timer is canceled and the stream does not emit events.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isHostReachable(AwsConnectionOption option) Future<AwsConnectionResult>
Ping a single address. See AwsConnectionOption for more information about the accepted argument.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

defaultAddresses List<AwsConnectionOption>
Predefined trusted addresses. google: "1.1.1.1" and "8.8.4.4". opendns: "208.67.222.222".
final
defaultInterval Duration
The request interval is every 3 seconds by default.
no setter
defaultPort int
The default connection port is 53. For more information see "https://www.google.com/search?q=dns server port".
no setter
defaultTimeOut Duration
The default timeout is 5 seconds before an unreachable request is dropped.
no setter