Hi

I am considering adding a new socket option, in order to get the number 
of subscriptions on the sub side socket.

This is because in the dynamic subscribe/unsubscribe scenario it is
possible to receive a message whilst in a loop


 while (true)
 {
        zmq::message_t msg;
        sm.recv(&msg);
        // do an unsubscribe of last remaining subscription for this socket

       // whoops return to the loop and we will block forever
}
    
If we could query the number of subscriptions from the socket,
the program could terminate cleanly.

Thoughts?

Jon

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to