[zeromq-dev] ZMQ_STREAM with inproc ?

Goswin von Brederlow goswin-v-b at web.de
Mon Feb 10 11:12:32 CET 2014


On Sun, Feb 09, 2014 at 12:16:48AM +0100, Laurent Alebarde wrote:
> 
> When I replace the tcp address "tcp://127.0.0.1:5556" with an
> *inproc* one, say "inproc://testStream", in /tests/test_stream.cpp/,
> the test fails. It asserts on
> 
> rc = zmq_recv (stream, buffer, 255, 0);
>     assert (rc == 0);
> 
> The documentation for sockets says: "/A socket of type 'ZMQ_STREAM'
> is used to send and receive TCP data from a //
> //non-0MQ peer, when using the tcp:// transport/.", so, possibly the
> cases other than tcp are not valid ?
> 
> 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".

> As ZMQ_STREAM has a raw behaviour, it is interesting for many
> things. It would be nice to be able to use the other transports with
> it.

It might be nice to use udp or multicast. Does that work? Maybe even
ipc.

But I fail to see the use case for inproc. For other transport types
there is a boxing of messages for the on-wire protocol. But inproc has
no on-wire. It directly puts the send message into the recievers pipe.
So saying you don't want any boxing of the data makes no sense to me.

MfG
	Goswin



More information about the zeromq-dev mailing list