MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / publish

Method publish

libcaf_io/caf/io/middleman.cpp:267–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267expected<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
283expected<void> middleman::unpublish(const actor_addr& whom, uint16_t port) {
284 auto lg = log::io::trace("whom = {}, port = {}", whom, port);

Callers 3

serverFunction · 0.45
run_serverFunction · 0.45
publishFunction · 0.45

Calls 4

traceFunction · 0.85
receiveMethod · 0.45
requestMethod · 0.45
mailMethod · 0.45

Tested by

no test coverage detected