fixing a bug: client over inproc receives msg with routing id set

This commit is contained in:
somdoron
2016-01-19 20:05:22 +02:00
parent e0fc5841cd
commit 669c5697c2
4 changed files with 18 additions and 5 deletions

View File

@@ -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 ;
}