diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-06-11 20:29:56 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-06-11 20:29:56 +0200 |
commit | bd86def1c799a35d5cef0c0a9a1347a18fea227e (patch) | |
tree | 4d70d0053ef86b5a614bd19ad4c5f420017279c7 /src/dist.hpp | |
parent | 3935258b826adc31815be4f91b2f6eb02bb3c8ed (diff) |
Actual message filtering happens in XPUB socket
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/dist.hpp')
-rw-r--r-- | src/dist.hpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/dist.hpp b/src/dist.hpp index 10613c1..005bb60 100644 --- a/src/dist.hpp +++ b/src/dist.hpp @@ -38,11 +38,26 @@ namespace zmq dist_t (); ~dist_t (); + // Adds the pipe to the distributor object. void attach (class pipe_t *pipe_); + + // Activates pipe that have previously reached high watermark. void activated (class pipe_t *pipe_); + + // Mark the pipe as matching. Subsequent call to send_to_matching + // will send message also to this pipe. + void match (class pipe_t *pipe_); + + // Removes the pipe from the distributor object. void terminated (class pipe_t *pipe_); - int send (class msg_t *msg_, int flags_); + // Send the message to all the outbound pipes. After the call all the + // pipes are marked as non-matching. + int send_to_matching (class msg_t *msg_, int flags_); + + // Send the message to the matching outbound pipes. + int send_to_all (class msg_t *msg_, int flags_); + bool has_out (); private: @@ -58,6 +73,9 @@ namespace zmq typedef array_t <class pipe_t, 2> pipes_t; pipes_t pipes; + // Number of all the pipes to send the next message to. + pipes_t::size_type matching; + // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. These are the pipes the messages // can be sent to at the moment. |