return_type operator()(Vs&&... vs) { auto iface = return_type::message_types(); auto tmp = remote_actor_impl(std::move(iface), std::forward<Vs>(vs)...); return actor_cast<return_type>(tmp); }
/** * Establish a new connection to the actor at `host` on given `port`. * @param host Valid hostname or IP address. * @param port TCP port. * @returns An {@link actor_ptr} to the proxy instance * representing a remote actor. * @throws std::invalid_argument Thrown when connecting to a typed actor. */ inline actor remote_actor(const std::string& host, uint16_t port) { auto res = remote_actor_impl(std::set<std::string>{}, host, port); return actor_cast<actor>(res); }
ActorHandle typed_remote_actor(const std::string& host, uint16_t port) { auto iface = ActorHandle::message_types(); return actor_cast<ActorHandle>(remote_actor_impl(std::move(iface), host, port)); }
/** * Establish a new connection to the actor at `host` on given `port`. * @param host Valid hostname or IP address. * @param port TCP port. * @returns An {@link actor_ptr} to the proxy instance * representing a remote actor. * @throws std::invalid_argument Thrown when connecting to a typed actor. */ inline actor remote_actor(const char* host, uint16_t port) { auto res = remote_actor_impl(host, port, std::set<std::string>{}); return actor_cast<actor>(res); }
inline actor remote_actor(Socket fd) { auto res = remote_actor_impl(std::move(fd), std::set<std::string>{}); return actor_cast<actor>(res); }
ActorHandle typed_remote_actor(std::string host, uint16_t port) { auto res = remote_actor_impl(ActorHandle::message_types(), std::move(host), port); return actor_cast<ActorHandle>(res); }
/// Establish a new connection to the actor at `host` on given `port`. /// @param host Valid hostname or IP address. /// @param port TCP port. /// @returns An {@link actor_ptr} to the proxy instance /// representing a remote actor. /// @throws network_error Thrown on connection error or /// when connecting to a typed actor. inline actor remote_actor(std::string host, uint16_t port) { auto res = remote_actor_impl(std::set<std::string>{}, std::move(host), port); return actor_cast<actor>(res); }