Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for index (0.15 sec)

  1. samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt

            val index = orderBy.indexOfFirst { it.matches(ianaSuite) }
            if (index == -1) Integer.MAX_VALUE else index
          }
        for (suiteId in sortedSuites) {
          print(suiteId.name)
          for (client in clients) {
            print("\t")
            val index = client.enabled.indexOfFirst { it.matches(suiteId) }
            if (index != -1) {
              print(index + 1)
            }
          }
          println()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
      @Throws(UnknownHostException::class)
      fun lookup(
        hostname: String,
        index: Int,
      ): InetAddress {
        return hostAddresses[hostname]!![index]
      }
    
      @Throws(UnknownHostException::class)
      override fun lookup(hostname: String): List<InetAddress> {
        requestedHosts.add(hostname)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

        sink: BufferedSink,
      ): Boolean {
        val index =
          mappings.binarySearch {
            when {
              it.sourceCodePoint1 < codePoint -> -1
              it.sourceCodePoint0 > codePoint -> 1
              else -> 0
            }
          }
    
        // Code points must be in 0..0x10ffff.
        require(index in mappings.indices) { "unexpected code point: $codePoint" }
    
        val mapping = mappings[index]
        var result = true
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        val connection = this.connection!!
        connection.lock.assertHeld()
    
        val calls = connection.calls
        val index = calls.indexOfFirst { it.get() == this@RealCall }
        check(index != -1)
    
        calls.removeAt(index)
        this.connection = null
    
        if (calls.isEmpty()) {
          connection.idleAtNs = System.nanoTime()
          if (connectionPool.connectionBecameIdle(connection)) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  5. deploy_website.sh

    # Generate the API docs
    ./gradlew dokkaHtmlMultiModule
    
    mv ./build/dokka/htmlMultiModule docs/5.x
    
    # Copy in special files that GitHub wants in the project root.
    cat README.md | grep -v 'project website' > docs/index.md
    cp CHANGELOG.md docs/changelogs/changelog.md
    cp CONTRIBUTING.md docs/contribute/contributing.md
    
    # Build the site and push the new files up to GitHub
    python3 -m venv venv
    source venv/bin/activate
    Shell Script
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Nov 20 15:26:12 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  6. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

    import org.apache.hc.core5.http.io.entity.EntityUtils
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Test
    
    /**
     * Apache HttpClient 5.x.
     *
     * https://hc.apache.org/httpcomponents-client-5.0.x/index.html
     *
     * Baseline test if we ned to validate OkHttp behaviour against other popular clients.
     */
    class ApacheHttpClientTest {
      private val httpClient = HttpClients.createDefault()
    
      @AfterEach fun tearDown() {
    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)
  7. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

        // We'd prefer to operate directly on `result` but it doesn't offer insertCodePoint(), only
        // appendCodePoint(). The Punycode algorithm processes code points in increasing code-point
        // order, not in increasing index order.
        val codePoints = mutableListOf<Int>()
    
        // consume all code points before the last delimiter (if there is one)
        //  and copy them to output, fail on any non-basic code point
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        client =
          client.newBuilder()
            .dns(FakeDns())
            .build()
        assertFailsWith<UnknownHostException> {
          getResponse(
            Request.Builder()
              .url("http://1234.1.1.1/index.html".toHttpUrl())
              .build(),
          )
        }
      }
    
      private fun testServerClosesOutput(socketPolicy: SocketPolicy) {
        server.enqueue(
          MockResponse(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

        // Search for misses.
        assertEquals(-1, binarySearch(0, 6) { index -> 0.compareTo(table[index]) })
        assertEquals(-2, binarySearch(0, 6) { index -> 2.compareTo(table[index]) })
        assertEquals(-3, binarySearch(0, 6) { index -> 4.compareTo(table[index]) })
        assertEquals(-4, binarySearch(0, 6) { index -> 6.compareTo(table[index]) })
        assertEquals(-5, binarySearch(0, 6) { index -> 8.compareTo(table[index]) })
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

      }
    }
    
    internal fun String.read14BitInt(index: Int): Int {
      val b0 = this[index].code
      val b1 = this[index + 1].code
      return (b0 shl 7) + b1
    }
    
    /**
     * An extremely generic binary search that doesn't know what data it's searching over. The caller
     * provides indexes and a comparison function, and this calls that function iteratively.
     *
    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)
Back to top