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:
@@ -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({});
|
||||
|
||||
@@ -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:
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void on_read(command cmd)
|
||||
void on_read(command cmd, std::size_t)
|
||||
{
|
||||
switch (cmd) {
|
||||
case command::hello:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user