Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for durations (0.17 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

       *     take any event class.
       * @param elapsedMs the time in milliseconds elapsed since the immediately-preceding event, or
       *     -1L to take any duration.
       */
      fun takeEvent(
        eventClass: Class<out ConnectionEvent>? = null,
        elapsedMs: Long = -1L,
      ): ConnectionEvent {
        val result = eventSequence.remove()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

    import java.net.URI
    import java.net.URLConnection
    import java.net.UnknownHostException
    import java.security.KeyStore
    import java.security.cert.CertificateException
    import java.security.cert.X509Certificate
    import java.time.Duration
    import java.util.Arrays
    import java.util.EnumSet
    import java.util.Locale
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicReference
    import java.util.zip.GZIPInputStream
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  5. 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)
  6. mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/MockWebServerExtension.kt

    import org.junit.jupiter.api.extension.ExtensionContext
    import org.junit.jupiter.api.extension.ParameterContext
    import org.junit.jupiter.api.extension.ParameterResolver
    
    /**
     * Runs MockWebServer for the duration of a single test method.
     *
     * Specifically while junit instances passes into test constructor
     * are typically shares amongst all tests, a fresh instance will be
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 11 12:12:36 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    @file:Suppress("ktlint:standard:filename")
    
    package okhttp3.internal
    
    import kotlin.time.Duration.Companion.seconds
    import okhttp3.CacheControl
    import okhttp3.Headers
    
    internal fun CacheControl.commonToString(): String {
      var result = headerValue
      if (result == null) {
        result =
          buildString {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CallTest.kt

        // First request: time out after 1s.
        client =
          client.newBuilder()
            .readTimeout(Duration.ofSeconds(1))
            .build()
        executeSynchronously("/a").assertBody("abc")
    
        // Second request: time out after 250ms.
        client =
          client.newBuilder()
            .readTimeout(Duration.ofMillis(250))
            .build()
        val request = Request.Builder().url(server.url("/b")).build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top