Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 528 for require (0.37 sec)

  1. okhttp/src/main/kotlin/okhttp3/ConnectionSpec.kt

          apply {
            require(tls) { "no cipher suites for cleartext connections" }
            require(cipherSuites.isNotEmpty()) { "At least one cipher suite is required" }
    
            this.cipherSuites = cipherSuites.copyOf() as Array<String> // Defensive copy.
          }
    
        fun allEnabledTlsVersions() =
          apply {
            require(tls) { "no TLS versions for cleartext connections" }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

            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
    
        when (mapping.type) {
          TYPE_IGNORED -> Unit
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
        require(length < bytesOut.size - lastFrame.start)
    
        // Move everything from bytesOut into a new buffer.
        val fullBuffer = Buffer()
        bytesOut.read(fullBuffer, bytesOut.size)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

      }
    
      fun writeObjectIdentifier(s: String) {
        val utf8 = Buffer().writeUtf8(s)
        val v1 = utf8.readDecimalLong()
        require(utf8.readByte() == '.'.code.toByte())
        val v2 = utf8.readDecimalLong()
        writeVariableLengthLong(v1 * 40 + v2)
    
        while (!utf8.exhausted()) {
          require(utf8.readByte() == '.'.code.toByte())
          val vN = utf8.readDecimalLong()
          writeVariableLengthLong(vN)
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      open fun getSelectedProtocol(sslSocket: SSLSocket): String? = null
    
      /** For MockWebServer. This returns the inbound SNI names. */
      @SuppressLint("NewApi")
      @IgnoreJRERequirement // This function is overridden to require API >= 24.
      open fun getHandshakeServerNames(sslSocket: SSLSocket): List<String> {
        val session = sslSocket.session as? ExtendedSSLSession ?: return listOf()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
          Buffer().apply {
            write(prefix)
            writeLong(upstreamSize)
            writeLong(metadataSize)
            require(size == FILE_HEADER_SIZE)
          }
    
        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(0, header, FILE_HEADER_SIZE)
      }
    
      @Throws(IOException::class)
    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)
  7. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      if (address[11] != 255.toByte()) return false
    
      return true
    }
    
    /** Encodes an IPv4 address in canonical form according to RFC 4001. */
    internal fun inet4AddressToAscii(address: ByteArray): String {
      require(address.size == 4)
      return Buffer()
        .writeDecimalLong((address[0] and 0xff).toLong())
        .writeByte('.'.code)
        .writeDecimalLong((address[1] and 0xff).toLong())
        .writeByte('.'.code)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt

      method: String,
      body: RequestBody?,
    ): Request.Builder =
      apply {
        require(method.isNotEmpty()) {
          "method.isEmpty() == true"
        }
        if (body == null) {
          require(!HttpMethod.requiresRequestBody(method)) {
            "method $method must have a request body."
          }
        } else {
          require(HttpMethod.permitsRequestBody(method)) {
            "method $method must not have a request body."
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

            when (val label = match.groups[1]!!.value) {
              "CERTIFICATE" -> {
                require(certificatePem == null) { "string includes multiple certificates" }
                certificatePem = match.groups[0]!!.value // Keep --BEGIN-- and --END-- for certificates.
              }
              "PRIVATE KEY" -> {
                require(pkcs8Base64 == null) { "string includes multiple private keys" }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      @Throws(IOException::class)
      private fun writeControlFrame(
        opcode: Int,
        payload: ByteString,
      ) {
        if (writerClosed) throw IOException("closed")
    
        val length = payload.size
        require(length <= PAYLOAD_BYTE_MAX) {
          "Payload size must be less than or equal to $PAYLOAD_BYTE_MAX"
        }
    
        val b0 = B0_FLAG_FIN or opcode
        sinkBuffer.writeByte(b0)
    
        var b1 = length
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
Back to top