Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for Deferred (0.28 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/android/DeferredSocketAdapter.kt

     * limitations under the License.
     */
    package okhttp3.internal.platform.android
    
    import javax.net.ssl.SSLSocket
    import okhttp3.Protocol
    
    /**
     * Deferred implementation of SocketAdapter that works by observing the socket
     * and initializing on first use.
     *
     * We use this because eager classpath checks cause confusion and excessive logging in Android,
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

              } else {
                firstException.addSuppressed(throwable)
              }
            }
    
            val nextPlan = connectResult.nextPlan
            if (nextPlan != null) {
              // Try this plan's successor before deferred plans because it won the race!
              routePlanner.deferredPlans.addFirst(nextPlan)
            }
          }
        } finally {
          cancelInFlightConnects()
        }
    
        throw firstException!!
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        }.also { expected ->
          assertThat(expected).hasMessage("timeout")
        }
      }
    
      /**
       * This test reproduces a crash where OkHttp attempted to use a deferred connection when the call
       * already had a healthy connection. It sets up a deferred connection by stalling the IPv6
       * connect, and it sets up a same-connection retry with [ErrorCode.REFUSED_STREAM].
       *
       * https://github.com/square/okhttp/pull/7190
       */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

      fun addPlan(): FakePlan {
        return FakePlan(nextPlanId++).also {
          plans += it
        }
      }
    
      override fun isCanceled() = canceled
    
      override fun plan(): FakePlan {
        // Return deferred plans preferentially. These don't require addPlan().
        if (deferredPlans.isNotEmpty()) return deferredPlans.removeFirst() as FakePlan
    
        if (nextPlanIndex >= plans.size && autoGeneratePlans) addPlan()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        if (reuseCallConnection != null) return reuseCallConnection
    
        // Attempt to get a connection from the pool.
        val pooled1 = planReusePooledConnection()
        if (pooled1 != null) return pooled1
    
        // Attempt a deferred plan before new routes.
        if (deferredPlans.isNotEmpty()) return deferredPlans.removeFirst()
    
        // Do blocking calls to plan a route for a new connection.
        val connect = planConnect()
    
    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. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteDatabase.kt

     * used so that OkHttp can learn from its mistakes: if there was a failure attempting to connect to
     * a specific IP address or proxy server, that failure is remembered and alternate routes are
     * preferred.
     */
    class RouteDatabase {
      private val _failedRoutes = mutableSetOf<Route>()
    
      val failedRoutes: Set<Route>
        @Synchronized get() = _failedRoutes.toSet()
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

     *
     * b0
     * --
     *
     * The inclusive start of the range. We get the first 14 bits of this code point from the section
     * and the last 7 bits from this byte.
     *
     * The end of the range is not encoded, but can be inferred by looking at the start of the range
     * that follows.
     *
     * b1
     * --
     *
     * This is either a mapping decision or the length of the mapped output, according to this table:
     *
     * ```
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

        private var lastModifiedString: String? = null
    
        /**
         * The expiration date of the cached response, if known. If both this field and the max age are
         * set, the max age is preferred.
         */
        private var expires: Date? = null
    
        /**
         * Extension header set by OkHttp specifying the timestamp when the cached HTTP request was
         * first initiated.
         */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  9. CHANGELOG.md

     *  Fix: Don't interpret trailers as headers after an HTTP/100 response. This was a bug only when
        the HTTP response body itself is empty.
     *  Fix: Don't crash when a fast fallback call has both a deferred connection and a held connection.
     *  Fix: `OkHttpClient` no longer implements `Cloneable`. It never should have; the class is
        immutable. This is left over from OkHttp 2.x (!) when that class was mutable. We're using the
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  10. LICENSE.txt

          "You" (or "Your") shall mean an individual or Legal Entity
          exercising permissions granted by this License.
    
          "Source" form shall mean the preferred form for making modifications,
          including but not limited to software source code, documentation
          source, and configuration files.
    
          "Object" form shall mean any form resulting from mechanical
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jul 23 14:02:28 GMT 2012
    - 11.1K bytes
    - Viewed (0)
Back to top