mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-13 22:50:19 +02:00
Problem: can't process ZMTP 3.1 cancel/subscribe commands
Solution: add some msg helpers to parse commands, and check for subscribe or cancel commands and process them accordingly in the xpub and xsub classes.
This commit is contained in:
@@ -163,7 +163,9 @@ int zmq::session_base_t::pull_msg (msg_t *msg_)
|
||||
|
||||
int zmq::session_base_t::push_msg (msg_t *msg_)
|
||||
{
|
||||
if (msg_->flags () & msg_t::command)
|
||||
// pass subscribe/cancel to the sockets
|
||||
if ((msg_->flags () & msg_t::command) && !msg_->is_subscribe ()
|
||||
&& !msg_->is_cancel ())
|
||||
return 0;
|
||||
if (_pipe && _pipe->write (msg_)) {
|
||||
int rc = msg_->init ();
|
||||
|
Reference in New Issue
Block a user