REQ sockets drop replies from unasked peers.

* Add lb_t::sendpipe() that returns the pipe that was used for sending,
  similar to fq_t::recvpipe().
* Add forwarder functions to dealer_t to access these two.
* Add logic to req_t to ignore replies on pipes that are not the one
  where the request was sent.
* Enable test in test_spec_req.
This commit is contained in:
Christian Kamm
2013-07-02 20:05:20 +02:00
parent 524bd7ac76
commit c56d797bf9
8 changed files with 78 additions and 9 deletions

View File

@@ -234,8 +234,7 @@ int main (void)
// SHALL accept an incoming message only from the last peer that it sent a
// request to.
// SHALL discard silently any messages received from other peers.
// *** Test disabled until libzmq does this properly ***
// test_req_only_listens_to_current_peer (ctx);
test_req_only_listens_to_current_peer (ctx);
}
int rc = zmq_ctx_term (ctx);