void outbound_path::emit_irregular_shutdown(local_actor* self, stream_slots slots, const strong_actor_ptr& hdl, error reason) { CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(hdl) << CAF_ARG(reason)); unsafe_send_as(self, hdl, make<downstream_msg::forced_close>(slots, self->address(), std::move(reason))); }
void outbound_path::emit_batch(local_actor* self, long xs_size, message xs) { CAF_LOG_TRACE(CAF_ARG(slots) << CAF_ARG(xs_size) << CAF_ARG(xs)); CAF_ASSERT(open_credit >= xs_size); open_credit -= xs_size; auto bid = next_batch_id++; downstream_msg::batch batch{static_cast<int32_t>(xs_size), std::move(xs), bid}; unsafe_send_as(self, hdl, downstream_msg{slots, self->address(), std::move(batch)}); }
void outbound_path::emit_open(local_actor* self, stream_slot slot, strong_actor_ptr to, message handshake_data, stream_priority prio) { CAF_LOG_TRACE(CAF_ARG(slot) << CAF_ARG(to) << CAF_ARG(handshake_data) << CAF_ARG(prio)); CAF_ASSERT(self != nullptr); CAF_ASSERT(to != nullptr); // Make sure we receive errors from this point on. stream_aborter::add(to, self->address(), slot, stream_aborter::sink_aborter); // Send message. unsafe_send_as(self, to, open_stream_msg{slot, std::move(handshake_data), self->ctrl(), nullptr, prio}); }
void outbound_path::emit_regular_shutdown(local_actor* self) { CAF_LOG_TRACE(CAF_ARG(slots)); unsafe_send_as(self, hdl, make<downstream_msg::close>(slots, self->address())); }