Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for Read (0.19 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        require(length < bytesOut.size - lastFrame.start)
    
        // Move everything from bytesOut into a new buffer.
        val fullBuffer = Buffer()
        bytesOut.read(fullBuffer, bytesOut.size)
    
        // Copy back all but what we're truncating.
        fullBuffer.read(bytesOut, lastFrame.start + length)
        outFrames.add(OutFrame(lastFrame.sequence, lastFrame.start, true))
        return writer
      }
    
    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)
  2. docs/changelogs/changelog_4x.md

     *  Upgrade: [Kotlin 1.8.21][kotlin_1_8_21].
    
    
    ## Version 4.11.0
    
    _2023-04-22_
    
     *  Fix: Don't fail the call when the response code is ‘HTTP 102 Processing’ or
        ‘HTTP 103 Early Hints’.
     *  Fix: Read the response even if writing the request fails. This means you'll get a proper HTTP
        response even if the server rejects your request body.
     *  Fix: Use literal IP addresses directly rather than passing them to `DnsOverHttps`.
    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)
  3. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val source = relay.newSource()
        val sourceBuffer = Buffer()
        assertThat(source!!.read(sourceBuffer, 5)).isEqualTo(5)
        assertThat(sourceBuffer.readUtf8()).isEqualTo("abcde")
        assertThat(source.read(sourceBuffer, 1024)).isEqualTo(8)
        assertThat(sourceBuffer.readUtf8()).isEqualTo("fghijklm")
        assertThat(source.read(sourceBuffer, 1024)).isEqualTo(-1)
        assertThat(sourceBuffer.size).isEqualTo(0)
        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)
  4. 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)
  5. 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)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            }
    
            // Fill the receive buffer without holding any locks.
            val read = source.read(receiveBuffer, remainingByteCount)
            if (read == -1L) throw EOFException()
            remainingByteCount -= read
    
            // Move the received data to the read buffer to the reader can read it. If this source has
            // been closed since this read began we must discard the incoming data and tell the
            // connection we've done so.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  7. okhttp/src/test/java/okhttp3/SocksProxy.kt

        }
      }
    
      private fun acceptCommand(
        fromAddress: InetAddress,
        fromSource: BufferedSource,
        fromSink: BufferedSink,
      ) {
        // Read the command.
        val version = fromSource.readByte() and 0xff
        if (version != VERSION_5) throw ProtocolException("unexpected version: $version")
    
        val command = fromSource.readByte() and 0xff
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        a.setString(0, "a1")
        assertThat(cache.remove("a")).isTrue()
        a.setString(1, "a2")
        a.commit()
        assertAbsent("a")
      }
    
      /**
       * Each read sees a snapshot of the file at the time read was called. This means that two reads of
       * the same key can see different data.
       */
      @ParameterizedTest
      @ArgumentsSource(FileSystemParamProvider::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  9. build.gradle.kts

        }
    
        systemProperty("okhttp.platform", platform)
        systemProperty("junit.jupiter.extensions.autodetection.enabled", "true")
      }
    
      // https://publicobject.com/2023/04/16/read-a-project-file-in-a-kotlin-multiplatform-test/
      tasks.withType<Test>().configureEach {
        environment("OKHTTP_ROOT", rootDir)
      }
    
      if (platform == "jdk8alpn") {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:32:42 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          condition.signalAll()
    
          return stream
        }
      }
    
      internal fun updateConnectionFlowControl(read: Long) {
        this.withLock {
          readBytes.update(total = read)
          val readBytesToAcknowledge = readBytes.unacknowledged
          if (readBytesToAcknowledge >= okHttpSettings.initialWindowSize / 2) {
            writeWindowUpdateLater(0, readBytesToAcknowledge)
    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)
Back to top