Commit cf6952f1 authored by Joseph Noir's avatar Joseph Noir

Add function to detach scribes in test multiplexer

parent 1d93cf63
...@@ -256,6 +256,10 @@ public: ...@@ -256,6 +256,10 @@ public:
void virtual_send(datagram_handle src, datagram_handle ep, void virtual_send(datagram_handle src, datagram_handle ep,
const buffer_type&); const buffer_type&);
/// Detaches a scribe identified by `hdl` and optianlly makes it send a
/// disconnect message to its broker.
void detach(connection_handle hdl, bool invoke_detach_message = false);
/// Waits until a `runnable` is available and executes it. /// Waits until a `runnable` is available and executes it.
void exec_runnable(); void exec_runnable();
......
...@@ -938,6 +938,11 @@ void test_multiplexer::virtual_send(datagram_handle dst, datagram_handle ep, ...@@ -938,6 +938,11 @@ void test_multiplexer::virtual_send(datagram_handle dst, datagram_handle ep,
read_data(dst); read_data(dst);
} }
void test_multiplexer::detach(connection_handle hdl,
bool invoke_detach_message) {
scribe_data_[hdl].ptr->detach(this, invoke_detach_message);
}
void test_multiplexer::exec_runnable() { void test_multiplexer::exec_runnable() {
CAF_ASSERT(std::this_thread::get_id() == tid_); CAF_ASSERT(std::this_thread::get_id() == tid_);
CAF_LOG_TRACE(""); CAF_LOG_TRACE("");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment