alibaba / alibaba/yalantinglibs
coro_rpc简介 示例代码错误
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 327
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 2
Description
https://alibaba.github.io/yalantinglibs/zh/coro_rpc/coro_rpc_introduction.html
#include "rpc_service.hpp"
#include
using namespace coro_rpc;
using namespace async_simple::coro;
Lazy test_client() {
coro_rpc_client client;
co_await client.connect("localhost", /*port =*/"9000");
auto r = co_await client.call("hello coro_rpc"); //传参数调用rpc函数
std::cout << r.result.value() << "\n"; //will print "hello coro_rpc"
}
int main() {
syncAwait(test_client());
}
错误行
std::cout << r.result.value() << "\n"; //will print "hello coro_rpc"
r.result.value()改为r.value()后可以运行
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the coro_rpc introduction example at the linked documentation page and inspect the client call result usage. Update the output expression to match the runnable result API, then verify that the example runs and prints "hello coro_rpc".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100