Added socket option ZMQ_INVERT_MATCHING.

ZMQ_INVERT_MATCHING reverses the PUB/SUB prefix matching. The subscription
list becomes a rejection list. The PUB socket sends messages to all
connected (X)SUB sockets that do not have any matching subscription.

Whenever the option is used on a PUB/XPUB socket, any connecting SUB
sockets must also set it or they will reject everything the publisher
sends them. XSUB sockets are unaffected because they do not filter out
incoming messages.
This commit is contained in:
Julien Ruffin
2015-01-26 15:59:19 +01:00
parent 148cec0a52
commit cf2238f80e
11 changed files with 222 additions and 2 deletions

View File

@@ -50,6 +50,9 @@ namespace zmq
// will send message also to this pipe.
void match (zmq::pipe_t *pipe_);
// Marks all pipes that are not matched as matched and vice-versa.
void reverse_match();
// Mark all pipes as non-matching.
void unmatch ();