Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 95 for Addresses (0.16 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

        val result = proxies[nextProxyIndex++]
        resetNextInetSocketAddress(result)
        return result
      }
    
      /** Prepares the socket addresses to attempt for the current proxy or host. */
      @Throws(IOException::class)
      private fun resetNextInetSocketAddress(proxy: Proxy) {
        // Clear the addresses. Necessary if getAllByName() below throws!
        val mutableInetSocketAddresses = mutableListOf<InetSocketAddress>()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  2. docs/features/connections.md

    They're also concrete: each URL identifies a specific path (like `/square/okhttp`) and query (like `?q=sharks&lang=en`). Each webserver hosts many URLs.
    
    ### [Addresses](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-address/)
    
    Addresses specify a webserver (like `github.com`) and all of the **static** configuration necessary to connect to that server: the port number, HTTPS settings, and preferred network protocols (like HTTP/2).
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Feb 21 03:33:59 GMT 2022
    - 5.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/InetAddressOrder.kt

    /**
     * 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
     */
    fun reorderForHappyEyeballs(addresses: List<InetAddress>): List<InetAddress> {
      if (addresses.size < 2) {
        return addresses
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/AsyncDns.kt

       */
      @ExperimentalOkHttpApi
      interface Callback {
        /**
         * Return addresses for a dns query for a single class of IPv4 (A) or IPv6 (AAAA).
         * May be an empty list indicating that the host is unreachable.
         */
        fun onResponse(
          hostname: String,
          addresses: List<InetAddress>,
        )
    
        /**
         * Returns an error for the DNS query.
         */
        fun onFailure(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Dns.kt

    import okhttp3.Dns.Companion.SYSTEM
    
    /**
     * A domain name service that resolves IP addresses for host names. Most applications will use the
     * [system DNS service][SYSTEM], which is the default. Some applications may provide their own
     * implementation to use a different DNS server, to prefer IPv6 addresses, to prefer IPv4 addresses,
     * or to force a specific known IP address.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/DoubleInetAddressDns.kt

    import okhttp3.Dns
    
    /**
     * A network that always resolves two IP addresses per host. Use this when testing route selection
     * fallbacks to guarantee that a fallback address is available.
     */
    class DoubleInetAddressDns : Dns {
      override fun lookup(hostname: String): List<InetAddress> {
        val addresses = Dns.SYSTEM.lookup(hostname)
        return listOf(addresses[0], addresses[0])
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 1K bytes
    - Viewed (0)
  7. okhttp-android/src/androidTest/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt

        AndroidAsyncDns.IPv4.query(
          hostname,
          object : AsyncDns.Callback {
            override fun onResponse(
              hostname: String,
              addresses: List<InetAddress>,
            ) {
              allAddresses.addAll(addresses)
              latch.countDown()
            }
    
            override fun onFailure(
              hostname: String,
              e: IOException,
            ) {
              exception = e
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

    /**
     * This test binds two different web servers (IPv4 and IPv6) to the same port, but on different
     * local IP addresses. Requests made to `127.0.0.1` will reach the IPv4 server, and requests made to
     * `::1` will reach the IPv6 server.
     *
     * By orchestrating two different servers with the same port but different IP addresses, we can
     * test what OkHttp does when both are reachable, or if only one is reachable.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      private var nextAddress = 0xff000064L // 255.0.0.100 in IPv4; ::ff00:64 in IPv6.
    
      /** Sets the results for `hostname`.  */
      operator fun set(
        hostname: String,
        addresses: List<InetAddress>,
      ): FakeDns {
        hostAddresses[hostname] = addresses
        return this
      }
    
      /** Clears the results for `hostname`.  */
      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  10. okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt

            executor,
            null,
            object : DnsResolver.Callback<List<InetAddress>> {
              override fun onAnswer(
                addresses: List<InetAddress>,
                rCode: Int,
              ) {
                callback.onResponse(hostname, addresses)
              }
    
              override fun onError(e: DnsResolver.DnsException) {
                callback.onFailure(
                  hostname,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 10:07:48 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top