mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-23 08:31:46 +02:00
fixing a bug: client over inproc receives msg with routing id set
This commit is contained in:
@@ -38,10 +38,10 @@ int main (void)
|
||||
void *server = zmq_socket (ctx, ZMQ_SERVER);
|
||||
void *client = zmq_socket (ctx, ZMQ_CLIENT);
|
||||
|
||||
int rc = zmq_bind (server, "tcp://127.0.0.1:5560");
|
||||
int rc = zmq_bind (server, "inproc://test-client-server");
|
||||
assert (rc == 0);
|
||||
|
||||
rc = zmq_connect (client, "tcp://127.0.0.1:5560");
|
||||
rc = zmq_connect (client, "inproc://test-client-server");
|
||||
assert (rc == 0);
|
||||
|
||||
zmq_msg_t msg;
|
||||
@@ -87,6 +87,9 @@ int main (void)
|
||||
rc = zmq_msg_recv (&msg, client, 0);
|
||||
assert (rc == 1);
|
||||
|
||||
routing_id = zmq_msg_routing_id (&msg);
|
||||
assert (routing_id == 0);
|
||||
|
||||
rc = zmq_msg_close (&msg);
|
||||
assert (rc == 0);
|
||||
|
||||
@@ -101,5 +104,3 @@ int main (void)
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user