public async function readAllowPartialSuccessAsync()

in src/io/BufferedReader.php [65:88]


  public async function readAllowPartialSuccessAsync(
    ?int $max_bytes = null,
    ?int $timeout_ns = null,
  ): Awaitable<string> {
    _OS\arg_assert(
      $max_bytes is null || $max_bytes > 0,
      "Max bytes must be null, or greater than 0",
    );
    _OS\arg_assert(
      $timeout_ns is null || $timeout_ns > 0,
      "Timeout must be null, or greater than 0",
    );

    if ($this->eof) {
      return '';
    }
    if ($this->buffer === '') {
      await $this->fillBufferAsync(null, $timeout_ns);
    }

    // We either have a buffer, or reached EOF; either way, behavior matches
    // read, so just delegate
    return $this->readImpl($max_bytes);
  }