mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 18:55:10 +01:00
Fix identity exchange for inproc transport
The socket connecting using the inproc transport never received the identity of the remote peer.
This commit is contained in:
parent
88db804bb9
commit
12c0c6aa74
@ -437,6 +437,18 @@ int zmq::socket_base_t::connect (const char *addr_)
|
|||||||
pipes [0]->flush ();
|
pipes [0]->flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If required, send the identity of the peer to the local socket.
|
||||||
|
if (peer.options.send_identity) {
|
||||||
|
msg_t id;
|
||||||
|
rc = id.init_size (peer.options.identity_size);
|
||||||
|
zmq_assert (rc == 0);
|
||||||
|
memcpy (id.data (), peer.options.identity, peer.options.identity_size);
|
||||||
|
id.set_flags (msg_t::identity);
|
||||||
|
bool written = pipes [1]->write (&id);
|
||||||
|
zmq_assert (written);
|
||||||
|
pipes [1]->flush ();
|
||||||
|
}
|
||||||
|
|
||||||
// Attach remote end of the pipe to the peer socket. Note that peer's
|
// Attach remote end of the pipe to the peer socket. Note that peer's
|
||||||
// seqnum was incremented in find_endpoint function. We don't need it
|
// seqnum was incremented in find_endpoint function. We don't need it
|
||||||
// increased here.
|
// increased here.
|
||||||
|
Loading…
Reference in New Issue
Block a user