| 255 | } |
| 256 | |
| 257 | expected<node_id> middleman::connect(std::string host, uint16_t port) { |
| 258 | auto self = scoped_actor{system()}; |
| 259 | auto res = self->mail(connect_atom_v, std::move(host), port) |
| 260 | .request(actor_handle(), infinite) |
| 261 | .receive(); |
| 262 | if (!res) |
| 263 | return std::move(res.error()); |
| 264 | return std::get<0>(*res); |
| 265 | } |
| 266 | |
| 267 | expected<uint16_t> middleman::publish(const strong_actor_ptr& whom, |
| 268 | std::set<std::string> sigs, uint16_t port, |