Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 112 for ready (0.17 sec)

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

        // Close the raw socket so we don't end up doing synchronous I/O.
        rawSocket?.closeQuietly()
      }
    
      override fun socket(): Socket = socket!!
    
      /** Returns true if this connection is ready to host new streams. */
      fun isHealthy(doExtensiveChecks: Boolean): Boolean {
        lock.assertNotHeld()
    
        val nowNs = System.nanoTime()
    
        val rawSocket = this.rawSocket!!
        val socket = this.socket!!
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        }
      }
    
      /**
       * Returns an immediately-executable task for the calling thread to execute, sleeping as necessary
       * until one is ready. If there are no ready queues, or if other threads have everything under
       * control this will return null. If there is more than a single task ready to execute immediately
       * this will start another thread to handle that work.
       */
      fun awaitTaskToRun(): Task? {
        lock.assertHeld()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/DispatcherTest.kt

          .containsExactlyInAnyOrder(a4, a5)
      }
    
      @Test
      fun synchronousCallAccessors() {
        val ready = CountDownLatch(2)
        val waiting = CountDownLatch(1)
        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                try {
                  ready.countDown()
                  waiting.await()
                } catch (e: InterruptedException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  4. docs/changelogs/changelog_4x.md

     *  Fix: Don't call `EventListener.responseHeadersStart()` or `responseBodyStart()` until bytes have
        been received. Previously these events were incorrectly sent too early, when OkHttp was ready to
        read the response headers or body, which mislead tracing tools. Note that the `responseFailed()`
        event always used to follow one of these events; now it may be sent without them.
    
     *  New: Upgrade to Kotlin 1.3.61.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

        factory.close()
      }
    
      inner class FakePlan(
        val id: Int,
      ) : RoutePlanner.Plan {
        var planningThrowable: Throwable? = null
        var canceled = false
        var connectState = ConnectState.READY
        val connection =
          factory.newConnection(
            pool = pool,
            route = factory.newRoute(address),
            idleAtNanos = defaultConnectionIdleAtNanos,
          )
        var retry: FakePlan? = null
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

        try {
          while (tcpConnectsInFlight.isNotEmpty() || routePlanner.hasNext()) {
            if (routePlanner.isCanceled()) throw IOException("Canceled")
    
            // Launch a new connection if we're ready to.
            val now = taskRunner.backend.nanoTime()
            var awaitTimeoutNanos = nextTcpConnectAtNanos - now
            var connectResult: ConnectResult? = null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

          },
          logger = logger,
        )
    
      /** Runs all tasks that are ready. Used by the test thread only. */
      fun runTasks() {
        advanceUntil(nanoTime)
      }
    
      /** Advance the simulated clock, then runs tasks that are ready. Used by the test thread only. */
      fun advanceUntil(newTime: Long) {
        taskRunner.assertThreadDoesntHoldLock()
    
    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)
  8. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          }
    
          val read = super.read(sink, minOf(byteCount, bytesRemainingInChunk))
          if (read == -1L) {
            carrier.noNewExchanges() // The server didn't supply the promised chunk length.
            val e = ProtocolException("unexpected end of stream")
            responseBodyComplete()
            throw e
          }
          bytesRemainingInChunk -= read
          return read
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(inputStream.read()).isEqualTo('A'.code)
        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        assertThat(inputStream.read()).isEqualTo('D'.code)
        assertThat(inputStream.read()).isEqualTo('E'.code)
        assertThat(inputStream.read()).isEqualTo('F'.code)
        assertThat(inputStream.read()).isEqualTo(-1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

      private var protocol: Protocol? = null
      private var source: BufferedSource? = null
      private var sink: BufferedSink? = null
      private var connection: RealConnection? = null
    
      /** True if this connection is ready for use, including TCP, tunnels, and TLS. */
      override val isReady: Boolean
        get() = protocol != null
    
      private fun copy(
        attempt: Int = this.attempt,
        tunnelRequest: Request? = this.tunnelRequest,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
Back to top