Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for partition (0.14 sec)

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

     */
    fun reorderForHappyEyeballs(addresses: List<InetAddress>): List<InetAddress> {
      if (addresses.size < 2) {
        return addresses
      }
    
      val (ipv6, ipv4) = addresses.partition { it is Inet6Address }
    
      return if (ipv6.isEmpty() || ipv4.isEmpty()) {
        addresses
      } else {
        interleave(ipv6, ipv4)
      }
    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)
  2. docs/recipes.md

            }
          }
        ```
    
    ### Timeouts ([.kt][ConfigureTimeoutsKotlin], [.java][ConfigureTimeoutsJava])
    
    Use timeouts to fail a call when its peer is unreachable. Network partitions can be due to client connectivity problems, server availability problems, or anything between. OkHttp supports connect, write, read, and full call timeouts.
    
    === ":material-language-kotlin: Kotlin"
        ```kotlin
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
Back to top