2
0
mirror of https://github.com/boostorg/redis.git synced 2026-02-21 15:22:14 +00:00

Improvements in the stream.

This commit is contained in:
Marcelo Zimbres
2021-10-31 22:05:38 +01:00
parent 4bf88b2424
commit 1be62b5d90
4 changed files with 85 additions and 36 deletions

View File

@@ -25,10 +25,10 @@ net::awaitable<void> ping()
requests.back().push(command::ping);
requests.back().push(command::quit);
resp3::stream s;
resp3::stream<tcp_socket> stream{std::move(socket)};
for (;;) {
resp3::response resp;
co_await s.async_consume(socket, requests, resp);
co_await stream.async_consume(requests, resp);
std::cout
<< requests.front().commands.front() << "\n"