Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for toLong (0.34 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        assertThat(source.readByteString(prefix.size.toLong())).isEqualTo(prefix)
        assertThat(source.readLong()).isEqualTo(upstreamSize)
        assertThat(source.readLong()).isEqualTo(metadataSize.toLong())
        if (upstream != null) {
          assertThat(source.readUtf8(upstreamSize)).isEqualTo(upstream)
        }
        if (metadata != null) {
          assertThat(source.readByteString(metadataSize.toLong())).isEqualTo(metadata)
        }
        source.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

          if (requestCaching.maxAgeSeconds != -1) {
            freshMillis = minOf(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds.toLong()))
          }
    
          var minFreshMillis: Long = 0
          if (requestCaching.minFreshSeconds != -1) {
            minFreshMillis = SECONDS.toMillis(requestCaching.minFreshSeconds.toLong())
          }
    
          var maxStaleMillis: Long = 0
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

            }
    
            toWrite = minOf(byteCount, writeBytesMaximum - writeBytesTotal).toInt()
            toWrite = minOf(toWrite, writer.maxDataLength())
            writeBytesTotal += toWrite.toLong()
          }
    
          byteCount -= toWrite.toLong()
          writer.data(outFinished && byteCount == 0L, streamId, buffer, toWrite)
        }
      }
    
      internal fun writeSynResetLater(
        streamId: Int,
        errorCode: ErrorCode,
      ) {
    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)
  4. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

          .isEqualTo(Settings.DEFAULT_INITIAL_WINDOW_SIZE.toLong())
        assertThat(connection.writeBytesMaximum)
          .isEqualTo(Settings.DEFAULT_INITIAL_WINDOW_SIZE.toLong())
        assertThat(stream1.writeBytesTotal)
          .isEqualTo(Settings.DEFAULT_INITIAL_WINDOW_SIZE.toLong())
        assertThat(stream1.writeBytesMaximum)
          .isEqualTo(Settings.DEFAULT_INITIAL_WINDOW_SIZE.toLong())
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

          frameHeader(
            streamId = streamId,
            length = length + 4,
            type = TYPE_PUSH_PROMISE,
            flags = if (byteCount == length.toLong()) FLAG_END_HEADERS else 0,
          )
          sink.writeInt(promisedStreamId and 0x7fffffff)
          sink.write(hpackBuffer, length.toLong())
    
          if (byteCount > length) writeContinuationFrames(streamId, byteCount - length)
        }
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirAnnotationValueConverter.kt

                type.isLong -> KtConstantValue.KtLongConstantValue((value as Number).toLong(), expression)
                type.isULong -> KtConstantValue.KtUnsignedLongConstantValue((value as Number).toLong().toULong(), expression)
                type.isString -> KtConstantValue.KtStringConstantValue(value.toString(), expression)
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Apr 25 07:15:56 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            if (outFramesIterator.hasNext()) {
              nextOutFrame = outFramesIterator.next()
              end = nextOutFrame.start
              truncated = false
            } else {
              end = outBytes.size.toLong()
              truncated = nextOutFrame.truncated
            }
    
            // Write a frame.
            val length = (end - start).toInt()
            outputStream.write(outBytes, start.toInt(), length)
    
    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)
  8. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

         */
        fun maxAge(
          maxAge: Int,
          timeUnit: TimeUnit,
        ) = apply {
          require(maxAge >= 0) { "maxAge < 0: $maxAge" }
          val maxAgeSecondsLong = timeUnit.toSeconds(maxAge.toLong())
          this.maxAgeSeconds = maxAgeSecondsLong.commonClampToInt()
        }
    
        /**
         * Accept cached responses that have exceeded their freshness lifetime by up to `maxStale`. If
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.webSocket!!.send(message)
        taskFaker.runTasks()
        assertThat(client.clientSourceBufferSize())
          .isGreaterThan(message.length.toLong()) // Not compressed.
        assertThat(client.processNextFrame()).isTrue()
        client.listener.assertTextMessage(message)
      }
    
      @Test
      fun messagesCompressedWhenConfigured() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

          Http2ExchangeCodec(client, this, chain, http2Connection)
        } else {
          socket.soTimeout = chain.readTimeoutMillis()
          source.timeout().timeout(chain.readTimeoutMillis.toLong(), MILLISECONDS)
          sink.timeout().timeout(chain.writeTimeoutMillis.toLong(), MILLISECONDS)
          Http1ExchangeCodec(client, this, source, sink)
        }
      }
    
      @Throws(SocketException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top