|
template <typename R, typename... Args> |
|
COASYNC_ATTRIBUTE((nodiscard)) |
|
awaitable<R> call(std::string const& __fn, Args&& ... __args) |
或许是这样
net::serde_stream reply = client.call_streaming("get_bytes", 5);
for(unsigned int i {}; i < 5; i ++) {
std::printf("%c\n", co_await reply.get<char>());
}
coasync/include/coasync/net/rpc/rpc_client.hpp
Lines 18 to 20 in 2e9135c
或许是这样