Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for cleanup (0.25 sec)

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

      private val routePlanner = FakeRoutePlanner()
      private val factory = routePlanner.factory
      private val taskFaker = routePlanner.taskFaker
      private val peer = MockHttp2Peer()
    
      /** The fake task runner prevents the cleanup runnable from being started.  */
      private val addressA = factory.newAddress("a")
      private val routeA1 = factory.newRoute(addressA)
      private val addressB = factory.newAddress("b")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        // Write metadata to the end of the file.
        writeMetadata(upstreamSize)
        file!!.channel.force(false)
    
        // Once everything else is in place we can swap the dirty header for a clean one.
        writeHeader(PREFIX_CLEAN, upstreamSize, metadata.size.toLong())
        file!!.channel.force(false)
    
        // This file is complete.
        synchronized(this@Relay) {
          complete = true
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        val request: Request
          get() = originalRequest
    
        val call: RealCall
          get() = this@RealCall
    
        /**
         * Attempt to enqueue this async call on [executorService]. This will attempt to clean up
         * if the executor has been shut down by reporting the call as failed.
         */
        fun executeOn(executorService: ExecutorService) {
          client.dispatcher.assertThreadDoesntHoldLock()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

       * simultaneously adopted and removed.
       */
      private val connections = ConcurrentLinkedQueue<RealConnection>()
    
      init {
        // Put a floor on the keep alive duration, otherwise cleanup will spin loop.
        require(keepAliveDuration > 0L) { "keepAliveDuration <= 0: $keepAliveDuration" }
      }
    
      fun idleConnectionCount(): Int {
        return connections.count {
          it.withLock { it.calls.isEmpty() }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

        }
    
        override fun secureConnectEnd(
          call: Call,
          handshake: Handshake?,
        ) {
          logger.removeHandler(loggerHandler)
        }
    
        override fun callEnd(call: Call) {
          // Cleanup log handler if failed.
          logger.removeHandler(loggerHandler)
        }
    
        override fun connectionAcquired(
          call: Call,
          connection: Connection,
        ) {
          if (random != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  6. docs/changelogs/upgrading_to_okhttp_4.md

    are uncommon and Kotlin callers may have incorrectly assigned the result to `List<String>`.
    
    
    Code Cleanup
    ------------
    
    IntelliJ and Android Studio offer a **Code Cleanup** feature that will automatically update
    deprecated APIs with their replacements. Access this feature from the _Search Anywhere_ dialog
    (double-press shift) or under the _Analyze_ menu.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

       */
      @Throws(SSLPeerUnverifiedException::class)
      fun check(
        hostname: String,
        peerCertificates: List<Certificate>,
      ) {
        return check(hostname) {
          (certificateChainCleaner?.clean(peerCertificates, hostname) ?: peerCertificates)
            .map { it as X509Certificate }
        }
      }
    
      internal fun check(
        hostname: String,
        cleanedPeerCertificatesFn: () -> List<X509Certificate>,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            Handshake(
              unverifiedHandshake.tlsVersion,
              unverifiedHandshake.cipherSuite,
              unverifiedHandshake.localCertificates,
            ) {
              certificatePinner.certificateChainCleaner!!.clean(
                unverifiedHandshake.peerCertificates,
                address.url.host,
              )
            }
          this.handshake = handshake
    
    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)
  9. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

        println("\n\nRequest to ${server2.inetSocketAddress}")
        executeSynchronously(request)
          .apply {
            // We may have a single failed request if not clean shutdown
            if (cleanShutdown) {
              assertSuccessful()
              assertCode(200)
    
              assertThat(server2.requestCount).isEqualTo(1)
            } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        return try {
          reader!!.processNextFrame()
          receivedCloseCode == -1
        } catch (e: Exception) {
          failWebSocket(e = e)
          false
        }
      }
    
      /**
       * Clean up and publish necessary close events when the reader is done. Invoked only by the reader
       * thread.
       */
      fun finishReader() {
        val failed: Boolean
        val code: Int
        val reason: String?
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
Back to top