libcaf
0.13.2
|
Manages brokers and network backends. More...
#include <middleman.hpp>
Inherits abstract_singleton.
Public Member Functions | |
middleman_actor | actor_handle () |
Returns a handle to the actor managing the middleman singleton. | |
template<class Impl > | |
intrusive_ptr< Impl > | get_named_broker (atom_value name) |
Returns the broker associated with name or creates a new instance of type Impl . More... | |
void | add_broker (broker_ptr bptr) |
Adds bptr to the list of known brokers. | |
template<class F > | |
void | run_later (F fun) |
Runs fun in the event loop of the middleman. More... | |
network::multiplexer & | backend () |
Returns the IO backend used by this middleman. | |
template<hook::event_type Event, typename... Ts> | |
void | notify (Ts &&...ts) |
Invokes the callback(s) associated with given event. | |
template<class C , typename... Ts> | |
void | add_hook (Ts &&...xs) |
Adds a new hook to the middleman. | |
template<class F > | |
void | add_shutdown_cb (F fun) |
Static Public Member Functions | |
static middleman * | instance () |
Get middleman instance. | |
Friends | |
class | detail::singletons |
Manages brokers and network backends.
intrusive_ptr<Impl> caf::io::middleman::get_named_broker | ( | atom_value | name | ) |
Returns the broker associated with name
or creates a new instance of type Impl
.
void caf::io::middleman::run_later | ( | F | fun | ) |
Runs fun
in the event loop of the middleman.