2 ms·
The reasonings assumes I don't know what's going on. This approach is precisely why I never tried ZMQ. How do you know my circumstances? Maybe this system has
by theamk 6y ago
The reasonings assumes I don't know what's going on. This approach is precisely why I never tried ZMQ.
How do you know my circumstances? Maybe this system has tuned rmem_max/wmem_max so I don't care about kernel buffers? Maybe my programs have problems with multi-gigabyte queues? Why are you assuming stuff for me?
The right answer of course is you don't expose a single "queue size" value, but you don't hide it either. Instead, expose something like "list of sockets: for each, here is an fd and a size of userspace queue". I'll then query the kernel myself to get sender's and receiver's kernel buffer size and so on.
Life is hard enough without libraries hiding stuff from you!