Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for reorderForHappyEyeballs (0.1 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/InetAddressOrderTest.kt

        )
      }
    
      @Test fun ipv6Only() {
        val result = reorderForHappyEyeballs(listOf(ipv6_ab, ipv6_fc))
    
        assertThat(result).isEqualTo(
          listOf(ipv6_ab, ipv6_fc),
        )
      }
    
      @Test fun ipv4Only() {
        val result =
          reorderForHappyEyeballs(
            listOf(
              ipv4_10_0_0_6,
              ipv4_10_0_0_1,
              ipv4_10_0_0_4,
            ),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/InetAddressOrder.kt

     *  - 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
      }
    
      val (ipv6, ipv4) = addresses.partition { it is Inet6Address }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

              result
            }
    
          // Try each address for best behavior in mixed IPv4/IPv6 environments.
          val orderedAddresses =
            when {
              fastFallback -> reorderForHappyEyeballs(addresses)
              else -> addresses
            }
    
          for (inetAddress in orderedAddresses) {
            mutableInetSocketAddresses += InetSocketAddress(inetAddress, socketPort)
          }
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Mar 06 17:33:38 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top