diff --git a/tests/test_connect_delay.cpp b/tests/test_connect_delay.cpp index a9e7aede..6dfc817f 100644 --- a/tests/test_connect_delay.cpp +++ b/tests/test_connect_delay.cpp @@ -41,7 +41,7 @@ int main (void) val = 0; rc = zmq_setsockopt(to, ZMQ_LINGER, &val, sizeof(val)); assert (rc == 0); - rc = zmq_bind (to, "tcp://*:6555"); + rc = zmq_bind (to, "tcp://127.0.0.1:6555"); assert (rc == 0); // Create a socket pushing to two endpoints - only 1 message should arrive. @@ -100,7 +100,7 @@ int main (void) // Bind the valid socket to = zmq_socket (context, ZMQ_PULL); assert (to); - rc = zmq_bind (to, "tcp://*:5560"); + rc = zmq_bind (to, "tcp://127.0.0.1:5560"); assert (rc == 0); val = 0; @@ -174,7 +174,7 @@ int main (void) int on = 1; rc = zmq_setsockopt (frontend, ZMQ_DELAY_ATTACH_ON_CONNECT, &on, sizeof (on)); assert (rc == 0); - rc = zmq_bind (backend, "tcp://*:5560"); + rc = zmq_bind (backend, "tcp://127.0.0.1:5560"); assert (rc == 0); rc = zmq_connect (frontend, "tcp://localhost:5560"); assert (rc == 0); @@ -205,7 +205,7 @@ int main (void) assert (backend); rc = zmq_setsockopt (backend, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); - rc = zmq_bind (backend, "tcp://*:5560"); + rc = zmq_bind (backend, "tcp://127.0.0.1:5560"); assert (rc == 0); // Ping backend to frontend so we know when the connection is up diff --git a/tests/test_disconnect_inproc.cpp b/tests/test_disconnect_inproc.cpp index 49c9e5c5..1b0fd317 100644 --- a/tests/test_disconnect_inproc.cpp +++ b/tests/test_disconnect_inproc.cpp @@ -39,7 +39,7 @@ int main(int argc, char** argv) { zmq_setsockopt(subSocket, ZMQ_SUBSCRIBE, "foo", 3) && printf("zmq_setsockopt: %s\n",zmq_strerror(errno)); zmq_bind(pubSocket, "inproc://someInProcDescriptor") && printf("zmq_bind: %s\n", zmq_strerror(errno)); - //zmq_bind(pubSocket, "tcp://*:30010") && printf("zmq_bind: %s\n", zmq_strerror(errno)); + //zmq_bind(pubSocket, "tcp://127.0.0.1:30010") && printf("zmq_bind: %s\n", zmq_strerror(errno)); int more; size_t more_size = sizeof(more); diff --git a/tests/test_probe_router.cpp b/tests/test_probe_router.cpp index 2f6930df..71884575 100644 --- a/tests/test_probe_router.cpp +++ b/tests/test_probe_router.cpp @@ -28,7 +28,7 @@ int main (void) // Create server and bind to endpoint void *server = zmq_socket (ctx, ZMQ_ROUTER); assert (server); - int rc = zmq_bind (server, "tcp://*:5560"); + int rc = zmq_bind (server, "tcp://127.0.0.1:5560"); assert (rc == 0); // Create client and connect to server, doing a probe diff --git a/tests/test_req_request_ids.cpp b/tests/test_req_request_ids.cpp index 9a83e9aa..85150ec2 100644 --- a/tests/test_req_request_ids.cpp +++ b/tests/test_req_request_ids.cpp @@ -42,7 +42,7 @@ int main (void) rc = zmq_connect (req, "tcp://localhost:5555"); assert (rc == 0); - rc = zmq_bind (router, "tcp://*:5555"); + rc = zmq_bind (router, "tcp://127.0.0.1:5555"); assert (rc == 0); // Send a multi-part request. diff --git a/tests/test_req_strict.cpp b/tests/test_req_strict.cpp index 71709098..0b926d77 100644 --- a/tests/test_req_strict.cpp +++ b/tests/test_req_strict.cpp @@ -36,7 +36,7 @@ int main (void) rc = zmq_setsockopt (req, ZMQ_REQ_REQUEST_IDS, &enabled, sizeof (int)); assert (rc == 0); - rc = zmq_bind (req, "tcp://*:5555"); + rc = zmq_bind (req, "tcp://127.0.0.1:5555"); assert (rc == 0); const size_t services = 5; diff --git a/tests/test_security_curve.cpp b/tests/test_security_curve.cpp index 436345e3..e7b6c1ee 100644 --- a/tests/test_security_curve.cpp +++ b/tests/test_security_curve.cpp @@ -109,7 +109,7 @@ int main (void) assert (rc == 0); rc = zmq_setsockopt (server, ZMQ_IDENTITY, "IDENT", 6); assert (rc == 0); - rc = zmq_bind (server, "tcp://*:9998"); + rc = zmq_bind (server, "tcp://127.0.0.1:9998"); assert (rc == 0); // Check CURVE security with valid credentials diff --git a/tests/test_security_null.cpp b/tests/test_security_null.cpp index 0cf0a51a..8a55632d 100644 --- a/tests/test_security_null.cpp +++ b/tests/test_security_null.cpp @@ -83,12 +83,12 @@ int main (void) // We first test client/server with no ZAP domain // Libzmq does not call our ZAP handler, the connect must succeed - rc = zmq_bind (server, "tcp://*:9000"); + rc = zmq_bind (server, "tcp://127.0.0.1:9000"); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9000"); assert (rc == 0); bounce (server, client); - zmq_unbind (server, "tcp://*:9000"); + zmq_unbind (server, "tcp://127.0.0.1:9000"); zmq_disconnect (client, "tcp://localhost:9000"); // Now define a ZAP domain for the server; this enables @@ -111,18 +111,18 @@ int main (void) //// The above code should not be required //rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, "WRONG", 5); //assert (rc == 0); - //rc = zmq_bind (server, "tcp://*:9001"); + //rc = zmq_bind (server, "tcp://127.0.0.1:9001"); //assert (rc == 0); //rc = zmq_connect (client, "tcp://localhost:9001"); //assert (rc == 0); //expect_bounce_fail (server, client); - //zmq_unbind (server, "tcp://*:9001"); + //zmq_unbind (server, "tcp://127.0.0.1:9001"); //zmq_disconnect (client, "tcp://localhost:9001"); // Now use the right domain, the test must pass rc = zmq_setsockopt (server, ZMQ_ZAP_DOMAIN, "TEST", 4); assert (rc == 0); - rc = zmq_bind (server, "tcp://*:9002"); + rc = zmq_bind (server, "tcp://127.0.0.1:9002"); assert (rc == 0); rc = zmq_connect (client, "tcp://localhost:9002"); assert (rc == 0); @@ -132,7 +132,7 @@ int main (void) // never succeeds and the test hangs. // ************************************************************** bounce (server, client); - zmq_unbind (server, "tcp://*:9002"); + zmq_unbind (server, "tcp://127.0.0.1:9002"); zmq_disconnect (client, "tcp://localhost:9002"); // Shutdown diff --git a/tests/test_security_plain.cpp b/tests/test_security_plain.cpp index 8522d593..4f914f4e 100644 --- a/tests/test_security_plain.cpp +++ b/tests/test_security_plain.cpp @@ -90,7 +90,7 @@ int main (void) int as_server = ZMQ_SERVER; rc = zmq_setsockopt (server, ZMQ_PLAIN_NODE, &as_server, sizeof (int)); assert (rc == 0); - rc = zmq_bind (server, "tcp://*:9998"); + rc = zmq_bind (server, "tcp://127.0.0.1:9998"); assert (rc == 0); char username [256]; diff --git a/tests/test_spec_dealer.cpp b/tests/test_spec_dealer.cpp index 08b54290..7d36d869 100644 --- a/tests/test_spec_dealer.cpp +++ b/tests/test_spec_dealer.cpp @@ -222,7 +222,7 @@ int main (void) void *ctx = zmq_ctx_new (); assert (ctx); - const char *binds [] = { "inproc://a", "tcp://*:5555" }; + const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transports = 0; transports < 2; ++transports) { diff --git a/tests/test_spec_pushpull.cpp b/tests/test_spec_pushpull.cpp index 6c5c620e..42305d9e 100644 --- a/tests/test_spec_pushpull.cpp +++ b/tests/test_spec_pushpull.cpp @@ -260,7 +260,7 @@ int main (void) void *ctx = zmq_ctx_new (); assert (ctx); - const char *binds [] = { "inproc://a", "tcp://*:5555" }; + const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { diff --git a/tests/test_spec_rep.cpp b/tests/test_spec_rep.cpp index 291787d6..22d6f95b 100644 --- a/tests/test_spec_rep.cpp +++ b/tests/test_spec_rep.cpp @@ -125,7 +125,7 @@ int main (void) void *ctx = zmq_ctx_new (); assert (ctx); - const char *binds [] = { "inproc://a", "tcp://*:5555" }; + const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { diff --git a/tests/test_spec_req.cpp b/tests/test_spec_req.cpp index 1520beab..83619acd 100644 --- a/tests/test_spec_req.cpp +++ b/tests/test_spec_req.cpp @@ -217,7 +217,7 @@ int main (void) void *ctx = zmq_ctx_new (); assert (ctx); - const char *binds [] = { "inproc://a", "tcp://*:5555" }; + const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; transport++) { diff --git a/tests/test_spec_router.cpp b/tests/test_spec_router.cpp index 22bc54b9..e85d3c95 100644 --- a/tests/test_spec_router.cpp +++ b/tests/test_spec_router.cpp @@ -179,7 +179,7 @@ int main (void) void *ctx = zmq_ctx_new (); assert (ctx); - const char *binds [] = { "inproc://a", "tcp://*:5555" }; + const char *binds [] = { "inproc://a", "tcp://127.0.0.1:5555" }; const char *connects [] = { "inproc://a", "tcp://localhost:5555" }; for (int transport = 0; transport < 2; ++transport) { diff --git a/tests/test_stream.cpp b/tests/test_stream.cpp index 2c7392c1..4ec8d446 100644 --- a/tests/test_stream.cpp +++ b/tests/test_stream.cpp @@ -54,7 +54,7 @@ test_stream_to_dealer (void) int zero = 0; rc = zmq_setsockopt (stream, ZMQ_LINGER, &zero, sizeof (zero)); assert (rc == 0); - rc = zmq_bind (stream, "tcp://*:5556"); + rc = zmq_bind (stream, "tcp://127.0.0.1:5556"); assert (rc == 0); // We'll be using this socket as the other peer @@ -173,7 +173,7 @@ test_stream_to_stream (void) void *server = zmq_socket (ctx, ZMQ_STREAM); assert (server); - rc = zmq_bind (server, "tcp://*:8080"); + rc = zmq_bind (server, "tcp://127.0.0.1:8080"); assert (rc == 0); void *client = zmq_socket (ctx, ZMQ_STREAM);