zeromq / cppzmq

Header-only C++ binding for libzmq
http://www.zeromq.org
MIT License
1.97k stars 757 forks source link

About the RCVHWM and SNDHWM #480

Closed mercerme closed 3 years ago

mercerme commented 3 years ago

I use epgm and pub sub model to send data through the socket. And I find that the data I can send and receive is decided by the value of RCVHWM and SNDHWM, but from the definition of them , I don't think it is reasonable. Can anyone help me about this? here is some of my settings.

     publisher.set(zmq::sockopt::sndbuf, 20000000);
    publisher.set(zmq::sockopt::rate, 62500);
    publisher.set(zmq::sockopt::sndhwm, 1000000);``
mercerme commented 3 years ago

however, if i set the sndhwm as 0 or a huge number like 100000000, the exe will crash. What I want to do is to keep sending real time data to the sub and the rate doesn't need to be high, just 50mb/s will be enough.