| 265 | } |
| 266 | |
| 267 | expected<uint16_t> middleman::publish(const strong_actor_ptr& whom, |
| 268 | std::set<std::string> sigs, uint16_t port, |
| 269 | const char* cstr, bool ru) { |
| 270 | auto lg = log::io::trace("whom = {}, sigs = {}, port = {}", whom, sigs, port); |
| 271 | if (!whom) |
| 272 | return sec::cannot_publish_invalid_actor; |
| 273 | std::string in; |
| 274 | if (cstr != nullptr) |
| 275 | in = cstr; |
| 276 | auto self = scoped_actor{system()}; |
| 277 | return self |
| 278 | ->mail(publish_atom_v, port, whom, std::move(sigs), std::move(in), ru) |
| 279 | .request(actor_handle(), infinite) |
| 280 | .receive(); |
| 281 | } |
| 282 | |
| 283 | expected<void> middleman::unpublish(const actor_addr& whom, uint16_t port) { |
| 284 | auto lg = log::io::trace("whom = {}, port = {}", whom, port); |