Is there any way to count the number of currently connected clients in a zeromq socket? If that's not possible, is there any way to determine whether the socket has no client connected to it?
Thanks.
You could simply implement an counter with a second socket.
Each time you have an active client or you close your socket, send a message on your "socket counter".
ZeroMQ is made to combine sockets.
Counting The Number of Connection in a ZeroMQ Socket