Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 111 for Dns (0.01 seconds)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

       * address for all hosts, regardless of the actual number of IP addresses reported by DNS.
       */
      fun newClient(): OkHttpClient {
        var client = testClient
        if (client == null) {
          client =
            initialClientBuilder()
              .dns(SINGLE_INET_ADDRESS_DNS) // Prevent unexpected fallback addresses.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/net/InetAddressesTest.java

        assertFalse(InetAddresses.isInetAddress("016.016.016.016"));
      }
    
      public void testForStringIPv4Input() throws UnknownHostException {
        String ipStr = "192.168.0.1";
        // Shouldn't hit DNS, because it's an IP string literal.
        InetAddress ipv4Addr = InetAddress.getByName(ipStr);
        assertThat(InetAddresses.forString(ipStr)).isEqualTo(ipv4Addr);
        assertTrue(InetAddresses.isInetAddress(ipStr));
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 16:38:16 GMT 2026
    - 36.3K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/InetAddressOrder.kt

    import java.net.Inet6Address
    import java.net.InetAddress
    import okhttp3.internal.interleave
    
    /**
     * Implementation of HappyEyeballs Sorting Addresses.
     *
     * The current implementation does not address any of:
     *  - Async DNS split by IP class
     *  - Stateful handling of connectivity results
     *  - The prioritisation of addresses
     *
     * https://datatracker.ietf.org/doc/html/rfc8305#section-4
     */
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Apr 24 15:15:15 GMT 2025
    - 1.3K bytes
    - Click Count (0)
  4. okhttp/api/android/okhttp.api

    	public final fun setMaxRequestsPerHost (I)V
    }
    
    public abstract interface class okhttp3/Dns {
    	public static final field Companion Lokhttp3/Dns$Companion;
    	public static final field SYSTEM Lokhttp3/Dns;
    	public abstract fun lookup (Ljava/lang/String;)Ljava/util/List;
    }
    
    public final class okhttp3/Dns$Companion {
    }
    
    public abstract class okhttp3/EventListener {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt

       */
      open fun proxySelectEnd(
        call: Call,
        url: HttpUrl,
        proxies: List<@JvmSuppressWildcards Proxy>,
      ) {
      }
    
      /**
       * Invoked just prior to a DNS lookup. See [Dns.lookup].
       *
       * This can be invoked more than 1 time for a single [Call]. For example, if the response to the
       * [Call.request] is a redirect to a different host.
       *
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Oct 07 21:03:04 GMT 2025
    - 24.9K bytes
    - Click Count (0)
  6. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

    private fun runBatch(
      dnsProviders: List<DnsOverHttps>,
      names: List<String>,
    ) {
      var time = System.currentTimeMillis()
      for (dns in dnsProviders) {
        println("Testing ${dns.url}")
        for (host in names) {
          print("$host: ")
          System.out.flush()
          try {
            val results = dns.lookup(host)
            println(results)
          } catch (uhe: UnknownHostException) {
            var e: Throwable? = uhe
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  7. android-test/src/test/kotlin/okhttp/android/test/AndroidLoggingTest.kt

    import org.robolectric.shadows.ShadowLog
    
    @RunWith(RobolectricTestRunner::class)
    class AndroidLoggingTest {
      val clientBuilder =
        OkHttpClient.Builder().connectionSpecs(listOf(ConnectionSpec.CLEARTEXT)).dns {
          throw UnknownHostException("shortcircuit")
        }
    
      val request = Request("http://google.com/robots.txt".toHttpUrl())
    
      @Test
      fun testHttpLoggingInterceptor() {
        val interceptor =
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Aug 21 14:27:04 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.containsExactly
    import java.net.InetAddress
    import java.net.UnknownHostException
    import java.util.Collections
    import okio.Buffer
    
    class FakeDns : Dns {
      private val hostAddresses: MutableMap<String, List<InetAddress>> =
        Collections.synchronizedMap(mutableMapOf())
      private val requestedHosts: MutableList<String> = Collections.synchronizedList(mutableListOf())
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Feb 04 20:20:29 GMT 2026
    - 2.6K bytes
    - Click Count (0)
  9. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

    package okhttp3.dnsoverhttps
    
    import java.io.EOFException
    import java.net.InetAddress
    import java.net.UnknownHostException
    import okio.Buffer
    import okio.ByteString
    import okio.utf8Size
    
    /**
     * Trivial Dns Encoder/Decoder, basically ripped from Netty full implementation.
     */
    internal object DnsRecordCodec {
      private const val SERVFAIL = 2
      private const val NXDOMAIN = 3
      const val TYPE_A = 0x0001
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 3.9K bytes
    - Click Count (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

          .assertHeader("", "ef")
      }
    
      @Test
      fun customDns() {
        // Configure a DNS that returns our local MockWebServer for android.com.
        val dns = FakeDns()
        dns["android.com"] = Dns.SYSTEM.lookup(server.url("/").host)
        client =
          client
            .newBuilder()
            .dns(dns)
            .build()
        server.enqueue(MockResponse())
        val request =
          Request(
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 146.5K bytes
    - Click Count (0)
Back to Top