refactored ZMQ_ROUTER_ANNOUNCE_SELF code. renamed it to ZMQ_PROBE_NEW_PEERS.

implement it for DEALER tocket.
+documentation
This commit is contained in:
shripchenko
2013-05-23 01:49:40 -07:00
committed by Pieter Hintjens
parent d5f603690f
commit 97324398a7
3 changed files with 12 additions and 11 deletions

View File

@@ -398,12 +398,15 @@ bool zmq::router_t::identify_peer (pipe_t *pipe_)
rc = probe_msg_.init ();
errno_assert (rc == 0);
rc = pipe_->write (&probe_msg_);
zmq_assert (rc);
ok = pipe_->write (&probe_msg_);
pipe_->flush ();
rc = probe_msg_.close ();
errno_assert (rc == 0);
// Ignore not probed peers
if (!ok)
return false;
}
return true;