- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for duration (0.21 sec)
-
okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt
assertThat(certificate.notAfter.time).isEqualTo(10000L) } @Test fun customDuration() { val now = System.currentTimeMillis() val heldCertificate = HeldCertificate.Builder() .duration(5, TimeUnit.SECONDS) .build() val certificate = heldCertificate.certificate val deltaMillis = 1000.0 val durationMillis = 5000L assertThat(certificate.notBefore.time.toDouble())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 22.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
internal fun checkDuration( name: String, duration: Long, unit: TimeUnit, ): Int { check(duration >= 0L) { "$name < 0" } val millis = unit.toMillis(duration) require(millis <= Integer.MAX_VALUE) { "$name too large" } require(millis != 0L || duration <= 0L) { "$name too small" } return millis.toInt() } internal fun checkDuration( name: String, duration: Duration, ): Int {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt
* Sets the certificate to be valid immediately and until the specified duration has elapsed. * The precision of this field is seconds; further precision will be truncated. */ fun duration( duration: Long, unit: TimeUnit, ) = apply { val now = System.currentTimeMillis() validityInterval(now, now + unit.toMillis(duration)) } /**
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) -
okhttp/src/main/kotlin/okhttp3/CacheControl.kt
* will not be used and a network request will be made. * * @param maxAge a non-negative duration. This is stored and transmitted with [TimeUnit.SECONDS] * precision; finer precision will be lost. */ fun maxAge(maxAge: Duration) = apply { val maxAgeSeconds = maxAge.inWholeSeconds require(maxAgeSeconds >= 0) { "maxAge < 0: $maxAgeSeconds" }
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) -
okhttp/src/test/java/okhttp3/OkHttpClientTest.kt
try { builder.callTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try { builder.connectTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try { builder.writeTimeout(Duration.ofNanos(1)) } catch (ignored: IllegalArgumentException) { } try { builder.readTimeout(Duration.ofNanos(1))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 13.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
MockResponse.Builder() .headersDelay(500, TimeUnit.MILLISECONDS) .build(), ) client = client.newBuilder() .readTimeout(Duration.ZERO) .writeTimeout(Duration.ZERO) .callTimeout(Duration.ofMillis(100)) .build() newWebSocket() clientListener.assertFailure(InterruptedIOException::class.java, "timeout") } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 35.2K bytes - Viewed (1) -
docs/changelogs/changelog_4x.md
been, leading to rare cases of infinite retries. Please upgrade to this release! * Fix: don't return stale DNS entries in `DnsOverHttps`. We were caching DNS results indefinitely rather than the duration specified in the response's cache-control header. * Fix: Verify certificate IP addresses in canonical form. When a server presents a TLS certificate
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
import assertk.assertions.isFalse import assertk.assertions.isNotNull import assertk.assertions.isTrue import java.io.IOException import java.io.InterruptedIOException import java.net.HttpURLConnection import java.time.Duration import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicReference import kotlin.test.assertFailsWith import mockwebserver3.MockResponse
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
import assertk.assertions.isNotNull import assertk.assertions.isNull import assertk.assertions.isSameInstanceAs import assertk.assertions.isTrue import java.io.IOException import java.net.SocketTimeoutException import java.time.Duration import java.util.concurrent.BlockingQueue import java.util.concurrent.LinkedBlockingQueue import java.util.concurrent.SynchronousQueue import java.util.concurrent.ThreadPoolExecutor import java.util.concurrent.TimeUnit
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K bytes - Viewed (0) -
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 {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 16.2K bytes - Viewed (0)