Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for loop (0.45 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          assertThat(e).isInstanceOf(ConnectionEvent.ConnectStart::class.java)
        } else {
          eventSequence.forEach loop@{
            when (e.closes(it)) {
              null -> return // no open event
              true -> return // found open event
              false -> return@loop // this is not the open event so continue
            }
          }
          Assertions.fail<Any>("event $e without matching start event")
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_4x.md

        This regression was introduced in OkHttp 4.3.0.
     *  Fix: Don't crash with an `IllegalArgumentException` when using custom trust managers on
        Android 10. Android uses reflection to look up a magic `checkServerTrusted()` method and we
        didn't have it.
     *  Fix: Explicitly specify the remote server name when making HTTPS connections on Android 5. In
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

      var commaFound = false
      loop@ while (!exhausted()) {
        when (this[0]) {
          ','.code.toByte() -> {
            // Consume ','.
            readByte()
            commaFound = true
          }
    
          ' '.code.toByte(), '\t'.code.toByte() -> {
            readByte()
            // Consume space or tab.
          }
    
          else -> break@loop
        }
      }
      return commaFound
    }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

      var maxStaleSeconds = -1
      var minFreshSeconds = -1
      var onlyIfCached = false
      var noTransform = false
      var immutable = false
    
      var canUseHeaderValue = true
      var headerValue: String? = null
    
      loop@ for (i in 0 until headers.size) {
        val name = headers.name(i)
        val value = headers.value(i)
    
        when {
          name.equals("Cache-Control", ignoreCase = true) -> {
            if (headerValue != null) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

        assertThat(inflater.inflate(message)).isEqualTo("Hello inflation!".encodeUtf8())
      }
    
      /**
       * We had a bug where self-finishing inflater streams would infinite loop!
       * https://github.com/square/okhttp/issues/8078
       */
      @Test fun `inflate returns finished before bytesRead reaches input length`() {
        val inflater = MessageInflater(false)
        val message = "53621260020000".decodeHex()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 06 05:31:00 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Protocol.kt

         *
         * @throws IOException if `protocol` is unknown.
         */
        @JvmStatic
        @Throws(IOException::class)
        fun get(protocol: String): Protocol {
          // Unroll the loop over values() to save an allocation.
          @Suppress("DEPRECATION")
          return when (protocol) {
            HTTP_1_0.protocol -> HTTP_1_0
            HTTP_1_1.protocol -> HTTP_1_1
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

          }
    
          val now = backend.nanoTime()
          var minDelayNanos = Long.MAX_VALUE
          var readyTask: Task? = null
          var multipleReadyTasks = false
    
          // Decide what to run. This loop's goal wants to:
          //  * Find out what this thread should do (either run a task or sleep)
          //  * Find out if there's enough work to start another thread.
          eachQueue@ for (queue in readyQueues) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

          assertThat(e).matchesPredicate { it is CallStart || it is Canceled }
        } else {
          eventSequence.forEach loop@{
            when (e.closes(it)) {
              null -> return // no open event
              true -> return // found open event
              false -> return@loop // this is not the open event so continue
            }
          }
          fail<Any>("event $e without matching start event")
        }
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9K bytes
    - Viewed (1)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformRule.kt

          const val JDK8_ALPN_PROPERTY = "jdk8alpn"
          const val JDK8_PROPERTY = "jdk8"
          const val OPENJSSE_PROPERTY = "openjsse"
          const val BOUNCYCASTLE_PROPERTY = "bouncycastle"
          const val LOOM_PROPERTY = "loom"
    
          /**
           * For whatever reason our BouncyCastle provider doesn't work with ECDSA keys. Just configure it
           * to use RSA-2048 instead.
           *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.3K bytes
    - Viewed (0)
Back to top