天天看点

关于HWM设置不起作用的问题

You should call 

setsockopt

 BEFORE 

bind

 or 

connect

.

这个问题苦恼了一个多星期~~只怪没有好好看guide和API~~~

http://api.zeromq.org/3-2%3azmq-setsockopt

Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects.