2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 04:42:09 +00:00

Adds the size of the read to on_read.

This commit is contained in:
Marcelo Zimbres
2022-04-16 19:59:06 +02:00
parent dc80c04347
commit 5e86fb9d03
8 changed files with 11 additions and 9 deletions

View File

@@ -246,7 +246,7 @@ struct read_op {
cli->wait_write_timer_.cancel_one();
// TODO: Pass the read size to on_read.
recv->on_read(cli->cmd);
recv->on_read(cli->cmd, n);
}
self.complete({});

View File

@@ -48,8 +48,10 @@ public:
adapter_(nd, ec);
}
void on_read(command cmd)
void on_read(command cmd, std::size_t n)
{
std::cout << cmd << ": " << n << std::endl;
switch (cmd) {
case command::hello:
{

View File

@@ -44,7 +44,7 @@ public:
adapter_(nd, ec);
}
void on_read(command cmd)
void on_read(command cmd, std::size_t)
{
switch (cmd) {
case command::hello:

View File

@@ -54,7 +54,7 @@ public:
void on_push() { }
void on_read(command cmd)
void on_read(command cmd, std::size_t)
{
switch (cmd) {
case command::ping:

View File

@@ -37,7 +37,7 @@ public:
adapter_(nd, ec);
}
void on_read(command cmd)
void on_read(command cmd, std::size_t)
{
switch (cmd) {
case command::hello:

View File

@@ -87,9 +87,9 @@ public:
}
}
void on_read(command cmd)
void on_read(command cmd, std::size_t n)
{
std::cout << cmd << "\n";
std::cout << cmd << ": " << n << "\n";
switch (cmd) {
case command::hello:

View File

@@ -60,7 +60,7 @@ public:
}
}
void on_read(command cmd)
void on_read(command cmd, std::size_t)
{
switch (cmd) {
case command::hello:

View File

@@ -51,7 +51,7 @@ public:
adapter_(nd, ec);
}
void on_read(command cmd)
void on_read(command cmd, std::size_t)
{
switch (cmd) {
case command::hello: