summaryrefslogtreecommitdiff
path: root/src/object.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-08-28 16:51:46 +0200
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-08-28 16:51:46 +0200
commitcb09c6951e2c4405318b422a1f9213af3e4b6b8a (patch)
treefb5d4dfd6a71745e885b2501f19cfbbb38c6f441 /src/object.cpp
parent2dd501651592baa7f9e49f52e1321ae2b9b4e126 (diff)
pipe deallocation added
Diffstat (limited to 'src/object.cpp')
-rw-r--r--src/object.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/object.cpp b/src/object.cpp
index 4d54ebf..b3cf898 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -83,6 +83,14 @@ void zmq::object_t::process_command (command_t &cmd_)
cmd_.args.bind.in_pipe, cmd_.args.bind.out_pipe);
return;
+ case command_t::pipe_term:
+ process_pipe_term ();
+ return;
+
+ case command_t::pipe_term_ack:
+ process_pipe_term_ack ();
+ return;
+
case command_t::term_req:
process_term_req (cmd_.args.term_req.object);
return;
@@ -100,6 +108,16 @@ void zmq::object_t::process_command (command_t &cmd_)
}
}
+void zmq::object_t::register_pipe (class pipe_t *pipe_)
+{
+ dispatcher->register_pipe (pipe_);
+}
+
+void zmq::object_t::unregister_pipe (class pipe_t *pipe_)
+{
+ dispatcher->unregister_pipe (pipe_);
+}
+
zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t taskset_)
{
return dispatcher->choose_io_thread (taskset_);
@@ -166,6 +184,22 @@ void zmq::object_t::send_revive (object_t *destination_)
send_command (cmd);
}
+void zmq::object_t::send_pipe_term (writer_t *destination_)
+{
+ command_t cmd;
+ cmd.destination = destination_;
+ cmd.type = command_t::pipe_term;
+ send_command (cmd);
+}
+
+void zmq::object_t::send_pipe_term_ack (reader_t *destination_)
+{
+ command_t cmd;
+ cmd.destination = destination_;
+ cmd.type = command_t::pipe_term_ack;
+ send_command (cmd);
+}
+
void zmq::object_t::send_term_req (socket_base_t *destination_,
owned_t *object_)
{
@@ -223,6 +257,16 @@ void zmq::object_t::process_revive ()
zmq_assert (false);
}
+void zmq::object_t::process_pipe_term ()
+{
+ zmq_assert (false);
+}
+
+void zmq::object_t::process_pipe_term_ack ()
+{
+ zmq_assert (false);
+}
+
void zmq::object_t::process_term_req (owned_t *object_)
{
zmq_assert (false);