While playing around with the code (latest version of the zeromq/libzmq repo) I 
noticed the issue: A recv on a router is supposed to add a message envelope 
containing the sender's identity, but this doesn't seem happen for auto 
generated identities.

Attached I have a simple test program that will run either a server (>2 
arguments) or client (<=2 arguments), the client starts a ROUTER and simply 
prints all parts of a message on a single line. The server will use the second 
argument as IDENTITY and send any further arguments as messages to the client 
using a DEALER socket.

This produces the expected output:
$ ./test foo bar baz xyzzy quux
Server!

$ ./test
Client!
foo bar
foo baz
foo xyzzy
foo quux

So far, so good. Now, if we uncomment the zmq_setsockopt in the server we'd 
expect the router to produce auto-generated identities, but this doesn't happen.

$ ./test foo bar baz xyzzy quux
Server!

$ ./test
Client!
 bar
 baz
 xyzzy
 quux

Did I misunderstand anything or is this a bug?

Attachment: test.c
Description: Binary data

--
Merijn
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to