Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 127 for Read (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

        @Throws(IOException::class)
        override fun read(
          sink: Buffer,
          byteCount: Long,
        ): Long {
          while (left == 0) {
            source.skip(padding.toLong())
            padding = 0
            if (flags and FLAG_END_HEADERS != 0) return -1L
            readContinuationHeader()
            // TODO: test case for empty continuation header?
          }
    
          val read = source.read(sink, minOf(byteCount, left.toLong()))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val response = call.execute()
        val inputStream = response.body.byteStream()
        assertThat(inputStream.read()).isEqualTo('A'.code)
        assertThat(inputStream.read()).isEqualTo('B'.code)
        assertThat(inputStream.read()).isEqualTo('C'.code)
        assertThat(inputStream.read()).isEqualTo(-1)
        assertThat(inputStream.read()).isEqualTo(-1)
        inputStream.close()
      }
    
      @ParameterizedTest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

     *
     * Unfortunately Java's networking APIs don't offer a good health check, so we go on our own by
     * attempting to read with a short timeout. If the fails immediately we know the socket is
     * unhealthy.
     *
     * @param source the source used to read bytes from the socket.
     */
    internal fun Socket.isHealthy(source: BufferedSource): Boolean {
      return try {
        val readTimeout = soTimeout
        try {
    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)
  4. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * class to read a response that is larger than the entire memory allocated to the current process.
     * It can even stream a response larger than the total storage on the current device, which is a
     * common requirement for video streaming applications.
     *
     * Because this class does not buffer the full response in memory, the application may not
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

            exchange.finishRequest()
          }
        } catch (e: IOException) {
          if (e is ConnectionShutdownException) {
            throw e // No request was sent so there's no response to read.
          }
          if (!exchange.hasFailure) {
            throw e // Don't attempt to read the response; we failed to send the request.
          }
          sendRequestException = e
        }
    
        try {
          if (responseBuilder == null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

          fileSystem = fileSystem,
          directory = directory,
          appVersion = VERSION,
          valueCount = ENTRY_COUNT,
          maxSize = maxSize,
          taskRunner = taskRunner,
        )
    
      // read and write statistics, all guarded by 'this'.
      internal var writeSuccessCount = 0
      internal var writeAbortCount = 0
      private var networkCount = 0
      private var hitCount = 0
      private var requestCount = 0
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/BasicDerAdapter.kt

          if (isOptional) return defaultValue as T
          throw ProtocolException("expected $this but was $peekedHeader at $reader")
        }
    
        val result =
          reader.read(name) {
            codec.decode(reader)
          }
    
        if (typeHint) {
          reader.typeHint = result
        }
    
        return result
      }
    
      override fun toDer(
        writer: DerWriter,
        value: T,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. docs/features/caching.md

     - **CacheHit**
     - CallEnd
     
    ### Cache Miss
    
    Under a cache miss the normal request events are seen but an additional event shows the presence of the cache.
    Cache Miss will be typical if the item has not been read from the network, is uncacheable, or is past it's 
    lifetime based on Response cache headers.
    
     - CallStart 
     - **CacheMiss**
     - ProxySelectStart
     - ... Standard Events ...
     - CallEnd
            
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        taskFaker.runTasks()
        assertThat(client.closed).isFalse()
        server.processNextFrame() // Read client closing, send server close.
        server.listener.assertClosing(1000, "Hello!")
        server.webSocket!!.finishReader()
        server.webSocket!!.close(1000, "Goodbye!")
        client.processNextFrame() // Read server closing, close connection.
        taskFaker.runTasks()
        client.listener.assertClosing(1000, "Goodbye!")
    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/cache/CacheInterceptor.kt

          object : Source {
            private var cacheRequestClosed = false
    
            @Throws(IOException::class)
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              val bytesRead: Long
              try {
                bytesRead = source.read(sink, byteCount)
              } catch (e: IOException) {
                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
Back to top