From bd86def1c799a35d5cef0c0a9a1347a18fea227e Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 11 Jun 2011 20:29:56 +0200 Subject: Actual message filtering happens in XPUB socket Signed-off-by: Martin Sustrik --- src/mtrie.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mtrie.hpp') 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 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 pipes_t; pipes_t pipes; + unsigned char min; unsigned short count; union { -- cgit v1.2.3