safe async_call

This commit is contained in:
qicosmos
2025-09-07 07:59:44 +08:00
parent 26a8e227b4
commit 8f2c0a4fa0
3 changed files with 21 additions and 6 deletions
+3 -5
View File
@@ -229,11 +229,9 @@ void test_echo() {
}
{
client.async_call(
"echo",
[](const asio::error_code &ec, string_view data) {
auto str = as<std::string>(data);
std::cout << "echo " << str << '\n';
client.async_call_s<&dummy::add>(
[](const asio::error_code &ec, auto ret) {
std::cout << "echo " << ret << '\n';
},
"test");
}