zeromq/libzmq — pull request #573 by shripchenko (2013-06-10 10:00:51+00:00)
Title: another iteration on ZMQ_PROBE_ROUTER

Now it properly works for ROUTER.
Previous place for this code was wrong. router_t::indentify_peer() depend on other party to send us something to activate reading on our end of pipe.

Actually Pieter's Hintjens idea:
>>@shripchenko I had a random idea today; wouldn't it be simpler for the user if a >>ROUTER socket generated an empty message automatically when it got a new peer, >>rather than doing this from the peer end?

is really good. Unfortunately I don't know much how ROUTER socket works, so can't implement it by myself.

Another note on this code - is that I disabled zmq_assert(rc). Failed probe is not really a bug. We can't just ignore the pipe, we could pipe->terminate() the pipe on error, but then we have to modify xpipe_terminated() since current implementation asserts on unknown pipe.