Constructor
# new base/ConnectionPoller(checkStatus, onStatusChange, optsopt)
Constructor of the connection poller.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
checkStatus |
CheckNetworkStatus
|
Connection-checking function. |
||
onStatusChange |
OnNetworkStatusChange
|
Callback that handles network status changed. |
||
opts |
Object
|
<optional> |
Optional parameter. |
|
networkStatus |
Boolean
|
<optional> |
true | The assumed network state before the first check. Set it to false to assume the device is originally disconnected from the internet. |
consecFailureThreshold |
Number
|
<optional> |
3 | How many polling failures before XDK considers it is disconnected from the internet. |
pollingInterval |
Number
|
<optional> |
30 | Number of seconds between two polling calls. |