Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for results (0.15 sec)

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

        if (planToReplace != null) {
          nextRouteToTry = planToReplace.route
          planToReplace.closeQuietly()
        }
    
        connectionUser.connectionAcquired(result)
        connectionUser.connectionConnectionAcquired(result)
        return ReusePlan(result)
      }
    
      /** Returns a plan for the first attempt at [route]. This throws if no plan is possible. */
      @Throws(IOException::class)
      internal fun planConnectToRoute(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        taskRunner: TaskRunner = this.taskRunner,
      ): RealConnection {
        val result =
          RealConnection.newTestConnection(
            taskRunner = taskRunner,
            connectionPool = pool,
            route = route,
            socket = Socket(),
            idleAtNs = idleAtNanos,
          )
        result.withLock { pool.put(result) }
        return result
      }
    
      fun newConnectionPool(
        taskRunner: TaskRunner = this.taskRunner,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          timeout: Long,
          unit: TimeUnit,
        ): T? {
          taskRunner.lock.withLock {
            val waitUntil = nanoTime + unit.toNanos(timeout)
            while (true) {
              val result = poll()
              if (result != null) return result
              if (nanoTime >= waitUntil) return null
              val editCountBefore = editCount
              yieldUntil { nanoTime >= waitUntil || editCount > editCountBefore }
            }
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

        }
        val result = plans[nextPlanIndex++]
        events += "take plan ${result.id}"
    
        if (result.yieldBeforePlanReturns) {
          taskFaker.yield()
        }
    
        val planningThrowable = result.planningThrowable
        if (planningThrowable != null) throw planningThrowable
    
        return result
      }
    
      override fun hasNext(failedConnection: RealConnection?): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt

        val plan1 = routePlanner.addPlan()
        plan1.connectState = TLS_CONNECTED
    
        taskRunner.newQueue().execute("connect") {
          val result0 = finder.find()
          assertThat(result0).isEqualTo(plan0.connection)
          val result1 = finder.find()
          assertThat(result1).isEqualTo(plan1.connection)
        }
    
        taskFaker.runTasks()
        assertEvents(
          "take plan 0",
          "take plan 1",
        )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 20.9K bytes
    - Viewed (0)
Back to top