Commit 5e1efc9e authored by Ian Barber's avatar Ian Barber

Update documentation for last endpoint to mention inaddr_any and add a test for…

Update documentation for last endpoint to mention inaddr_any and add a test for IPC last endpoint checking
parent 2533909f
......@@ -395,7 +395,8 @@ ZMQ_LAST_ENDPOINT: Retrieve the last endpoint set
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_LAST_ENDPOINT' option shall retrieve the last endpoint bound for
TCP and IPC transports. The returned value will be a string in the form of
a ZMQ DSN.
a ZMQ DSN. Note that if the TCP host is INADDR_ANY, indicated by a *, then
the returned address will be 0.0.0.0 (for IPv4).
[horizontal]
Option value type:: character string
......
......@@ -47,6 +47,13 @@ int main (int argc, char *argv [])
rc = zmq_getsockopt (sb, ZMQ_LAST_ENDPOINT, test, &siz);
assert (rc == 0 && strcmp (test, "tcp://127.0.0.1:54321") == 0);
rc = zmq_bind (sb, "ipc:///tmp/testep");
assert (rc == 0);
siz = 255;
rc = zmq_getsockopt (sb, ZMQ_LAST_ENDPOINT, test, &siz);
assert (rc == 0 && strcmp (test, "ipc:///tmp/testep") == 0);
return 0 ;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment