Doesn't this have to work?
#include <czmq.h>
zsock_t *sockout = zsock_new_pub("inproc://a");
zsock_set_sndhwm (sockout, 20);
How to set HWM and/or BUF sizes?
UPDATE: I added some more code and works in this context:
#include <string>
#include <czmq.h>
int main (void){
zsock_t *sockout = zsock_new_pub("inproc://a");
zsock_set_sndhwm (sockout, 20);
std::string data2send;
for (size_t i = 0; i < 1000; i++){
data2send = "data" + std::to_string(i);
zsock_send(sockout, "s", data2send.c_str() );
}
}
Although zsock_set_sndhwm (sockout, 20);
works in this particular context.
I have to figure out the context where it doesn't works.