Package com.castlabs.android.network
Class GoogleDNSConnectivityCheck
- java.lang.Object
-
- com.castlabs.android.network.SocketConnectivityCheck
-
- com.castlabs.android.network.GoogleDNSConnectivityCheck
-
- All Implemented Interfaces:
ConnectivityCheck
public final class GoogleDNSConnectivityCheck extends SocketConnectivityCheck
-
-
Constructor Summary
Constructors Constructor Description GoogleDNSConnectivityCheck(Context context)
Check the connectivity by establishing a connection to "8.8.8.8:53", which is a Google DNS, with the connection timeout of 5000msGoogleDNSConnectivityCheck(Context context, int timeoutMs)
Check the connectivity by establishing a connection to "8.8.8.8:53", which is a Google DNS, with specified connection timeout in ms
-
-
-
Constructor Detail
-
GoogleDNSConnectivityCheck
public GoogleDNSConnectivityCheck(@NonNull Context context)
Check the connectivity by establishing a connection to "8.8.8.8:53", which is a Google DNS, with the connection timeout of 5000ms- Parameters:
context
- The context
-
GoogleDNSConnectivityCheck
public GoogleDNSConnectivityCheck(@NonNull Context context, int timeoutMs)
Check the connectivity by establishing a connection to "8.8.8.8:53", which is a Google DNS, with specified connection timeout in ms- Parameters:
context
- The contexttimeoutMs
- The timeout in milliseconds
-
-