The architecture of bitshares ap
作者:
杨小伟的世界 | 来源:发表于
2018-08-07 16:55 被阅读0次
Local api call
The effect of following line. (fc/tests/api.cpp)
fc::api<calculator> api_calc( std::make_shared<some_calculator>() );
api<calculator> some_calculator
+----------------------+ +----------------------+
|_vtable | _vtable::visit_other( | |
| +------------------+ vtable_copy_visitor()) | |
| | add -------|------------------------>|add() |
| | sub -------|------------------------>|sub() |
| | | | |
| | | | |
| | | | |
+---+------------------+ +----------------------+
RPC
- auto apic = std::make_shared<websocket_api_connection>(*con, MAX_DEPTH);
- auto remote_login_api = apic->get_remote_api<login_api>();
- auto remote_calc = remote_login_api->get_calc();
- auto wsc = std::make_shared<websocket_api_connection>(*c, MAX_DEPTH);
- auto login = std::make_shared<login_api>();
- login->calc = calc_api;
- wsc->register_api(fc::api<login_api>(login));
本文标题:The architecture of bitshares ap
本文链接:https://www.haomeiwen.com/subject/vhuavftx.html
网友评论