libcaf  0.13.2
Public Member Functions | Static Public Member Functions | Friends | List of all members
caf::io::middleman Class Reference

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 middlemaninstance ()
 Get middleman instance.
 

Friends

class detail::singletons
 

Detailed Description

Manages brokers and network backends.

Member Function Documentation

template<class Impl >
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.

template<class F >
void caf::io::middleman::run_later ( fun)

Runs fun in the event loop of the middleman.

Note
This member function is thread-safe.

The documentation for this class was generated from the following file: