Skip to content

Commit

Permalink
support async_upload, support async_sendfile() with zerocopy in async…
Browse files Browse the repository at this point in the history
…_upload & async_chunked_upload (#608)
  • Loading branch information
poor-circle authored Jul 2, 2024
1 parent 2660e11 commit 00f8950
Show file tree
Hide file tree
Showing 8 changed files with 630 additions and 73 deletions.
2 changes: 1 addition & 1 deletion example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async_simple::coro::Lazy<resp_data> chunked_upload1(coro_http_client &client) {

auto fn = [&file, &buf]() -> async_simple::coro::Lazy<read_result> {
auto [ec, size] = co_await file.async_read(buf.data(), buf.size());
co_return read_result{buf, file.eof(), ec};
co_return read_result{{buf.data(), buf.size()}, file.eof(), ec};
};

auto result = co_await client.async_upload_chunked(
Expand Down
Loading

0 comments on commit 00f8950

Please sign in to comment.