一个RPC服务器,可以将功能绑定为同步或异步运行。 更多...
#include <Server.h>
carla::rpc::Server 的协作图:Public 成员函数 | |
| void | AsyncRun (size_t worker_threads) |
| template<typename FunctorT > | |
| void | BindAsync (const std::string &name, FunctorT &&functor) |
| template<typename FunctorT > | |
| void | BindSync (const std::string &name, FunctorT &&functor) |
| template<typename... Args> | |
| Server (Args &&... args) | |
| void | Stop () |
| void | SyncRunFor (time_duration duration) |
Private 属性 | |
| ::rpc::server | _server |
| boost::asio::io_context | _sync_io_context |
一个RPC服务器,可以将功能绑定为同步或异步运行。
使用AsyncRun启动工作线程,使用SyncRunFor在调用者线程中运行一段工作。
使用BindAsync绑定的函数将在工作线程中异步运行。使用BindSync绑定的函数将在 SyncRunFor函数中运行。
在文件 rpc/Server.h 第 34 行定义.
|
inlineexplicit |
在文件 rpc/Server.h 第 153 行定义.
引用了 _server.
|
inline |
|
inline |
在文件 rpc/Server.h 第 160 行定义.
引用了 _server , 以及 _sync_io_context.
被这些函数引用 ServerBinder::operator<<() , 以及 TEST().
这是这个函数的调用关系图:
|
inline |
|
inline |
在文件 rpc/Server.h 第 55 行定义.
引用了 _sync_io_context , 以及 carla::time_duration::to_chrono().
被这些函数引用 TEST().
函数调用图:
这是这个函数的调用关系图:
|
private |
在文件 rpc/Server.h 第 74 行定义.
被这些函数引用 AsyncRun(), BindAsync(), BindSync(), Server() , 以及 Stop().
|
private |
在文件 rpc/Server.h 第 72 行定义.
被这些函数引用 BindSync() , 以及 SyncRunFor().