|
expected< uint16_t > | open (uint16_t port, const char *in=nullptr, bool reuse=false) |
| Tries to open a port for other CAF instances to connect to.
|
|
expected< void > | close (uint16_t port) |
| Closes port port regardless of whether an actor is published to it.
|
|
expected< node_id > | connect (std::string host, uint16_t port) |
| Tries to connect to given node.
|
|
template<class Handle > |
expected< uint16_t > | publish (Handle &&whom, uint16_t port, const char *in=nullptr, bool reuse=false) |
| Tries to publish whom at port and returns either an error or the bound port. More...
|
|
template<class Handle > |
expected< void > | unpublish (const Handle &whom, uint16_t port=0) |
| Unpublishes whom by closing port or all assigned ports if port == 0 . More...
|
|
template<class ActorHandle = actor> |
expected< ActorHandle > | remote_actor (std::string host, uint16_t port) |
| Establish a new connection to the actor at host on given port . More...
|
|
actor_system & | system () |
| Returns the enclosing actor system.
|
|
const actor_system_config & | config () const |
| Returns the systemw-wide configuration.
|
|
middleman_actor | actor_handle () |
| Returns a handle to the actor managing the middleman singleton.
|
|
template<class Impl > |
actor | named_broker (const std::string &name) |
| Returns the broker associated with name or creates a new instance of type Impl . More...
|
|
template<class F > |
void | run_later (F fun) |
| Runs fun in the event loop of the middleman. More...
|
|
virtual network::multiplexer & | backend ()=0 |
| Returns the IO backend used by this middleman.
|
|
strong_actor_ptr | remote_lookup (std::string name, const node_id &nid) |
| Returns the actor associated with name at nid or invalid_actor if nid is not connected or has no actor associated to this name . More...
|
|
template<class Handle > |
expected< Handle > | remote_spawn (const node_id &nid, std::string name, message args, timespan timeout=timespan{std::chrono::minutes{1}}) |
|
template<class Handle , class Rep , class Period > |
expected< Handle > | remote_spawn (const node_id &nid, std::string name, message args, std::chrono::duration< Rep, Period > timeout) |
|
void | start () override |
| Starts any background threads needed by the module.
|
|
void | stop () override |
| Stops all background threads of the module.
|
|
void | init (actor_system_config &) override |
| Allows the module to change the configuration of the actor system during startup. More...
|
|
id_t | id () const override |
| Returns the identifier of this module.
|
|
void * | subtype_ptr () override |
| Returns a pointer to the subtype.
|
|
void | monitor (const node_id &node, const actor_addr &observer) override |
| Causes the module to send a node_down_msg to observer if this system loses connection to node . More...
|
|
void | demonitor (const node_id &node, const actor_addr &observer) override |
| Causes the module remove one entry for observer from the list of actors that receive a node_down_msg if this system loses connection to node . More...
|
|
template<spawn_options Os = no_spawn_options, class F = std::function<void(broker*)>, class... Ts> |
infer_handle_from_fun_t< F > | spawn_broker (F fun, Ts &&... xs) |
| Spawns a new functor-based broker.
|
|
template<spawn_options Os = no_spawn_options, class F = std::function<void(broker*)>, class... Ts> |
expected< infer_handle_from_fun_t< F > > | spawn_client (F fun, const std::string &host, uint16_t port, Ts &&... xs) |
| Returns a new functor-based broker connected to host:port or an error . More...
|
|
template<spawn_options Os = no_spawn_options, class F = std::function<void(broker*)>, class... Ts> |
expected< infer_handle_from_fun_t< F > > | spawn_server (F fun, uint16_t &port, Ts &&... xs) |
| Spawns a new broker as server running on given port . More...
|
|
template<spawn_options Os = no_spawn_options, class F = std::function<void(broker*)>, class... Ts> |
expected< infer_handle_from_fun_t< F > > | spawn_server (F fun, const uint16_t &port, Ts &&... xs) |
| Spawns a new broker as server running on given port . More...
|
|
const char * | name () const noexcept |
| Returns the human-readable name of the module.
|
|
Manages brokers and network backends.