Example #1
0
expected<ActorHandle> remote_actor(actor_system& sys, std::string host,
                                   uint16_t port) {
  detail::type_list<ActorHandle> tk;
  auto res = remote_actor(sys, sys.message_types(tk), std::move(host), port);
  if (res)
    return actor_cast<ActorHandle>(std::move(*res));
  return std::move(res.error());
}
Example #2
0
group remote_group(const std::string& group_identifier,
                   const std::string& host,
                   uint16_t port) {
  auto group_server = remote_actor(host, port);
  scoped_actor self;
  self->send(group_server, get_atom::value, group_identifier);
  group result;
  self->receive(
    [&](group& grp) {
      result = std::move(grp);
    }
  );
  return result;
}
Example #3
0
/**
 * @copydoc remote_actor(const char*,std::uint16_t)
 */
inline actor_ptr remote_actor(const std::string& host, std::uint16_t port) {
    return remote_actor(host.c_str(), port);
}