Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Deadline (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

        port == other.port &&
        scheme == other.scheme
    
    internal fun EventListener.asFactory() = EventListener.Factory { this }
    
    /**
     * Reads until this is exhausted or the deadline has been reached. This is careful to not extend the
     * deadline if one exists already.
     */
    @Throws(IOException::class)
    internal fun Source.skipAll(
      duration: Int,
      timeUnit: TimeUnit,
    ): Boolean {
      val nowNs = System.nanoTime()
    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)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

        // Call 1: set a deadline on the response body.
        val request1 = Request.Builder().url(server.url("/")).build()
        val response1 = client.newCall(request1).execute()
        val body1 = response1.body.source()
        assertThat(body1.readUtf8()).isEqualTo("abc")
        body1.timeout().deadline(5, TimeUnit.SECONDS)
    
        // Call 2: check for the absence of a deadline on the request body.
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

       *
       * The deadline to respond to this ping attempts to limit the cost of being wrong. If it is too
       * long, streams created while we await the pong will reuse broken connections and inevitably
       * fail. If it is too short, slow connections will be marked as failed and extra TCP and TLS
       * handshakes will be required.
       *
       * The deadline is currently hardcoded. We may make this configurable in the future!
    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. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val reader = BufferedReader(InputStreamReader(inputStream, StandardCharsets.UTF_8))
        assertThat(connection.getResponseCode()).isEqualTo(HttpURLConnection.HTTP_OK)
        assertThat(reader.readLine()).isEqualTo("hello world")
        val request = server.takeRequest()
        assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1")
        assertThat(request.getHeader("Accept-Language")).isEqualTo("en-US")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt

      /** Read a single line counted against the header size limit. */
      fun readLine(): String {
        val line = source.readUtf8LineStrict(headerLimit)
        headerLimit -= line.length.toLong()
        return line
      }
    
      /** Reads headers or trailers. */
      fun readHeaders(): Headers {
        val result = Headers.Builder()
        while (true) {
          val line = readLine()
          if (line.isEmpty()) break
          result.addLenient(line)
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

            if (console != null) {
              callback.password = console.readPassword(callback.prompt)
            } else {
              System.err.println(callback.prompt)
              callback.password = System.`in`.bufferedReader().readLine().toCharArray()
            }
          } else {
            throw UnsupportedCallbackException(callback)
          }
        }
      }
    }
    
    fun main() {
      YubikeyClientAuth().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

            state == STATE_WRITING_REQUEST_BODY ||
            state == STATE_READ_RESPONSE_HEADERS,
        ) {
          "state: $state"
        }
    
        try {
          val statusLine = StatusLine.parse(headersReader.readLine())
    
          val responseBuilder =
            Response.Builder()
              .protocol(statusLine.protocol)
              .code(statusLine.code)
              .message(statusLine.message)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  8. native-image-tests/src/main/kotlin/okhttp3/TestRegistration.kt

          RuntimeReflection.register(it)
        }
      }
    
      private fun registerKnownTests(access: Feature.BeforeAnalysisAccess) {
        val knownTestFile = File("src/main/resources/testlist.txt").absoluteFile
        knownTestFile.readLines().forEach {
          try {
            val testClass = access.findClassByName(it)
    
            if (testClass != null) {
              access.registerAsUsed(testClass)
              registerTest(access, testClass)
            }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. native-image-tests/src/main/kotlin/okhttp3/RunTests.kt

     */
    fun testSelectors(inputFile: File? = null): List<DiscoverySelector> {
      val sampleTestClass = SampleTest::class.java
    
      val lines =
        inputFile?.readLines() ?: sampleTestClass.getResource("/testlist.txt").readText().lines()
    
      val flatClassnameList =
        lines
          .filter { it.isNotBlank() }
    
      return flatClassnameList
        .mapNotNull {
          try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val reader = BufferedReader(InputStreamReader(connection.inputStream, UTF_8))
        assertThat(connection.responseCode).isEqualTo(HttpURLConnection.HTTP_OK)
        assertThat(reader.readLine()).isEqualTo("hello world")
        val request = server.takeRequest()
        assertThat(request.requestLine).isEqualTo("GET / HTTP/1.1")
        assertThat(request.headers["Accept-Language"]).isEqualTo("en-US")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
Back to top