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 Details

    • 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 context
      timeoutMs - The timeout in milliseconds