|
template<typename SyncProcedure , std::size_t N = internal::func_traits<SyncProcedure>::args_count> |
bool | add (std::string_view name, const std::array< std::string, N > &arguments_names, SyncProcedure &&fct) |
| Add a synchronous procedure to the dispatcher. More...
|
|
template<typename SyncProcedure > |
bool | add (std::string_view name, SyncProcedure &&fct) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename AsyncProcedure , std::size_t N = internal::func_traits<AsyncProcedure>::args_count - 1> |
bool | add_async (std::string_view name, const std::array< std::string, N > &arguments_names, AsyncProcedure &&fct) |
| Add an asynchronous procedure to the dispatcher. More...
|
|
template<typename AsyncProcedure > |
bool | add_async (std::string_view name, AsyncProcedure &&fct) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename Executor , typename CoroProcedure , std::size_t N = internal::func_traits<CoroProcedure>::args_count> |
bool | add_coro (std::string_view name, const Executor &executor, const std::array< std::string, N > &arguments_names, CoroProcedure &&coro) |
| Add a coroutine to the dispatcher. More...
|
|
template<typename Executor , typename CoroProcedure > |
bool | add_coro (std::string_view name, const Executor &executor, CoroProcedure &&coro) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename ExecutionContext , typename CoroProcedure , std::size_t N = internal::func_traits<CoroProcedure>::args_count> |
bool | add_coro (std::string_view name, ExecutionContext &ctx, const std::array< std::string, N > &arguments_names, CoroProcedure &&coro) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<typename ExecutionContext , typename CoroProcedure > |
bool | add_coro (std::string_view name, ExecutionContext &ctx, CoroProcedure &&coro) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
bool | remove (const std::string &name) |
| Remove a procedure from the dispatcher. More...
|
|
bool | has (const std::string &name) const |
| Check if a procedure is registered. More...
|
|
size_t | clear () |
| Remove all procedures. More...
|
|
std::vector< std::string > | known () const |
| Get the name of all known procedures. More...
|
|
template<typename Rpc, template< class... > class Map = default_map, typename Lockable = default_mutex>
class packio::dispatcher< Rpc, Map, Lockable >
The dispatcher class, used to store and dispatch procedures.
- Template Parameters
-
Rpc | RPC protocol implementation |
Map | The container used to associate procedures to their name |
Lockable | The lockable used to protect accesses to the procedure map |