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/mtrie.hpp | |
parent | 3935258b826adc31815be4f91b2f6eb02bb3c8ed (diff) |
Actual message filtering happens in XPUB socket
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/mtrie.hpp')
-rw-r--r-- | src/mtrie.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mtrie.hpp b/src/mtrie.hpp index cd47029..68a3f2c 100644 --- a/src/mtrie.hpp +++ b/src/mtrie.hpp @@ -35,8 +35,6 @@ namespace zmq { public: - typedef std::set <class pipe_t*> pipes_t; - mtrie_t (); ~mtrie_t (); @@ -55,8 +53,9 @@ namespace zmq // actually removed rather than de-duplicated. bool rm (unsigned char *prefix_, size_t size_, class pipe_t *pipe_); - // Get all matching pipes. - void match (unsigned char *data_, size_t size_, pipes_t &pipes_); + // Signal all the matching pipes. + void match (unsigned char *data_, size_t size_, + void (*func_) (class pipe_t *pipe_, void *arg_), void *arg_); private: @@ -68,8 +67,12 @@ namespace zmq void *arg_); bool rm_helper (unsigned char *prefix_, size_t size_, class pipe_t *pipe_); + void match_helper (unsigned char *data_, size_t size_, + void (*func_) (class pipe_t *pipe_, void *arg_), void *arg_); + typedef std::set <class pipe_t*> pipes_t; pipes_t pipes; + unsigned char min; unsigned short count; union { |