An RPC server in which functions can be bind to run synchronously or asynchronously. 更多...
#include <Server.h>
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 |
An RPC server in which functions can be bind to run synchronously or asynchronously.
Use AsyncRun
to start the worker threads, and use SyncRunFor
to run a slice of work in the caller's thread.
Functions that are bind using BindAsync
will run asynchronously in the worker threads. Functions that are bind using BindSync
will run within SyncRunFor
function.
在文件 rpc/Server.h 第 37 行定义.
|
inlineexplicit |
在文件 rpc/Server.h 第 146 行定义.
引用了 _server.
|
inline |
在文件 rpc/Server.h 第 49 行定义.
引用了 _server.
|
inline |
在文件 rpc/Server.h 第 152 行定义.
引用了 _server , 以及 _sync_io_context.
被这些函数引用 ServerBinder::operator<<().
|
inline |
|
inline |
|
private |
在文件 rpc/Server.h 第 72 行定义.
被这些函数引用 AsyncRun(), BindAsync(), BindSync(), Server() , 以及 Stop().
|
private |
在文件 rpc/Server.h 第 70 行定义.
被这些函数引用 BindSync() , 以及 SyncRunFor().