Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for selection (0.21 sec)

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

        val selection2 = routeSelector.next()
        assertThat(selection2.next()).isEqualTo(regularRoutes[1])
        assertThat(selection2.hasNext()).isFalse()
    
        // The second selection will contain all failed routes.
        val selection3 = routeSelector.next()
        assertThat(selection3.next()).isEqualTo(regularRoutes[0])
        assertThat(selection3.hasNext()).isFalse()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/DoubleInetAddressDns.kt

     * limitations under the License.
     */
    package okhttp3.internal
    
    import java.net.InetAddress
    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)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Dec 23 10:26:25 GMT 2023
    - 1K bytes
    - Viewed (0)
  3. docs/changelogs/changelog_4x.md

     *  Fix: Don't track unusable routes beyond their usefulness. We had a bug where we could track
        certain bad routes indefinitely; now we only track the ones that could be necessary.
     *  Fix: Defer proxy selection until a proxy is required. This saves calls to `ProxySelector` on
        calls that use a pooled connection.
    
    
    ## Version 4.3.1
    
    _2020-01-07_
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

       */
      operator fun hasNext(): Boolean = hasNextProxy() || postponedRoutes.isNotEmpty()
    
      @Throws(IOException::class)
      operator fun next(): Selection {
        if (!hasNext()) throw NoSuchElementException()
    
        // Compute the next set of routes to attempt.
        val routes = mutableListOf<Route>()
        while (hasNextProxy()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        // If we have a routes left, use 'em.
        if (routeSelection?.hasNext() == true) return true
    
        // If we haven't initialized the route selector yet, assume it'll have at least one route.
        val localRouteSelector = routeSelector ?: return true
    
        // If we do have a route selector, use its routes.
        return localRouteSelector.hasNext()
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_1x.md

     * New: Support for `spdy/3.1`. Dropped support for `spdy/3`.
     * New: Use ALPN on Android platforms that support it (4.4+)
     * New: CacheControl model and parser.
     * New: Protocol selection in MockWebServer.
     * Fix: Route selection shouldn't use TLS modes that we know will fail.
     * Fix: Cache SPDY responses even if the response body is closed prematurely.
     * Fix: Use strict timeouts when aborting a download.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Route.kt

     *    [proxy selector][java.net.ProxySelector] is used. It may return multiple proxies to attempt.
     *  * **IP address:** whether connecting directly to an origin server or a proxy, opening a socket
     *    requires an IP address. The DNS server may return multiple IP addresses to attempt.
     *
     * Each route is a specific selection of these options.
     */
    class Route(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/EventListener.kt

      /**
       * Invoked after proxy selection.
       *
       * Note that the list of proxies is never null, but it may be a list containing
       * only [Proxy.NO_PROXY]. This comes up in several situations:
       *
       * * If neither a proxy nor proxy selector is configured.
       * * If the proxy is configured explicitly as [Proxy.NO_PROXY].
       * * If the proxy selector returns only [Proxy.NO_PROXY].
       * * If the proxy selector returns an empty list or null.
       *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        return connectionListener.recordedEventTypes()
      }
    
      companion object {
        /**
         * A network that resolves only one IP address per host. Use this when testing route selection
         * fallbacks to prevent the host machine's various IP addresses from interfering.
         */
        private val SINGLE_INET_ADDRESS_DNS =
          Dns { hostname ->
            val addresses = Dns.SYSTEM.lookup(hostname)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt

    import javax.net.ssl.SSLSocket
    import okhttp3.Protocol
    import okhttp3.internal.platform.BouncyCastlePlatform
    import okhttp3.internal.platform.Platform
    import org.bouncycastle.jsse.BCSSLSocket
    
    /**
     * Simple non-reflection SocketAdapter for BouncyCastle.
     */
    class BouncyCastleSocketAdapter : SocketAdapter {
      override fun matchesSocket(sslSocket: SSLSocket): Boolean = sslSocket is BCSSLSocket
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top