[zeromq-dev] ZMQ_STREAM with inproc ?#

Goswin von Brederlow goswin-v-b at web.de
Sun Feb 16 15:05:36 CET 2014

On Fri, Feb 14, 2014 at 10:26:10AM +0100, Pieter Hintjens wrote:
> On Wed, Feb 12, 2014 at 9:25 AM, Laurent Alebarde <l.alebarde at free.fr> wrote:
> > If the answer is positive, I think it should assert as soon as the
> > socket  binds or connects to a none tcp address.
> >
> > Please don't assert. return an error. An application can never handle
> > an assert and give a good error, like e.g "Wrong transport type
> > specified in conffile".
> You can't sensibly be specifying tcp vs. inproc in a conffile... it's
> too intimately tied to the architecture. Especially when using STREAM
> sockets. I'd rather see a LOLRTFM assert when people do impossible API
> calls.
> -Pieter

Think about what that means for debugging such a problem. E.g in
python an assert will kill the whole python interpreter showing you
the file and line of the C file in limbzmq where the assertion is. On
the other hand an error can raise an exception in python and give you
the file and line where the bad API call is made.

I find the later far more usefull.


More information about the zeromq-dev mailing list