Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 65 for acquire (1.43 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt

        )
    
      private val deflaterSink = DeflaterSink(deflatedBytes, deflater)
    
      /** Deflates [buffer] in place as described in RFC 7692 section 7.2.1. */
      @Throws(IOException::class)
      fun deflate(buffer: Buffer) {
        require(deflatedBytes.size == 0L)
    
        if (noContextTakeover) {
          deflater.reset()
        }
    
        deflaterSink.write(buffer, buffer.size)
        deflaterSink.flush()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

            val protocolsCopy = protocols.toMutableList()
    
            // Validate that the list has everything we require and nothing we forbid.
            require(Protocol.H2_PRIOR_KNOWLEDGE in protocolsCopy || HTTP_1_1 in protocolsCopy) {
              "protocols must contain h2_prior_knowledge or http/1.1: $protocolsCopy"
            }
            require(Protocol.H2_PRIOR_KNOWLEDGE !in protocolsCopy || protocolsCopy.size <= 1) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private var receivedPongCount = 0
    
      /** True if we have sent a ping that is still awaiting a reply. */
      private var awaitingPong = false
    
      init {
        require("GET" == originalRequest.method) {
          "Request must be GET: ${originalRequest.method}"
        }
    
        this.key = ByteArray(16).apply { random.nextBytes(this) }.toByteString().base64()
      }
    
    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)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt

     *     failed connect attempts (such as trying the next [ConnectionSpec]), or as attempts that lost
     *     a race in fast follow-up.
     *
     *  4. If there's no existing connection, make a list of routes (which may require blocking DNS
     *     lookups) and attempt a new connection them. When failures occur, retries iterate the list of
     *     available routes.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

          "Code $code is reserved and may not be used."
        } else {
          null
        }
      }
    
      fun validateCloseCode(code: Int) {
        val message = closeCodeExceptionMessage(code)
        require(message == null) { message!! }
      }
    
      fun acceptHeader(key: String): String {
        return (key + ACCEPT_MAGIC).encodeUtf8().sha1().base64()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

              }
              else -> null
            }
          }
    
        // If the call's connection wasn't released, reuse it. We don't call connectionAcquired() here
        // because we already acquired it.
        if (connectionUser.candidateConnection() != null) {
          check(toClose == null)
          return ReusePlan(candidate)
        }
    
        // The call's connection was released.
        toClose?.closeQuietly()
    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)
  7. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

     */
    internal fun sections(mappings: List<Mapping>): Map<Int, List<MappedRange>> {
      val result = mutableMapOf<Int, MutableList<MappedRange>>()
    
      for (mapping in mappings) {
        require(!mapping.spansSections)
    
        val section = mapping.section
        val rangeStart = mapping.rangeStart
    
        val sectionList = result.getOrPut(section) { mutableListOf() }
    
        sectionList +=
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

            if (stream.isOpen) {
              streams[streamId] = stream
            }
          }
          if (associatedStreamId == 0) {
            writer.headers(outFinished, streamId, requestHeaders)
          } else {
            require(!client) { "client streams shouldn't have associated stream IDs" }
            // HTTP/2 has a PUSH_PROMISE frame.
            writer.pushPromise(associatedStreamId, streamId, requestHeaders)
          }
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_2x.md

           <version>1.4.0</version>
         </dependency>
         ```
    
     *  **`Request.Builder` no longer accepts null if a request body is required.**
        Passing null will now fail for request methods that require a body. Instead
        use an empty body such as this one:
    
        ```java
            RequestBody.create(null, new byte[0]);
        ```
    
     * **`CertificatePinner` now supports wildcard hostnames.** As always with
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

      }
    
    private fun checkSupportResponse(
      name: String,
      response: Response?,
    ) {
      response?.apply {
        require(networkResponse == null) { "$name.networkResponse != null" }
        require(cacheResponse == null) { "$name.cacheResponse != null" }
        require(priorResponse == null) { "$name.priorResponse != null" }
      }
    }
    
    fun Response.Builder.commonPriorResponse(priorResponse: Response?) =
      apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top