summaryrefslogtreecommitdiff
path: root/tests/timeo.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-21 07:07:57 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-21 07:07:57 +0200
commit36fd87810274329c8cd86344b95a0521541e7bab (patch)
treeec183c7dd3a9b1de3361e7211cbffc960d139cf1 /tests/timeo.cpp
parentd26e86aa0afc3ec2534eacb4131aee8f6805c36a (diff)
xs_shutdown implemented
This patch allows for partial shutdown of the socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'tests/timeo.cpp')
-rw-r--r--tests/timeo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/timeo.cpp b/tests/timeo.cpp
index bc73eec..fb17c85 100644
--- a/tests/timeo.cpp
+++ b/tests/timeo.cpp
@@ -30,7 +30,7 @@ extern "C"
void *sc = xs_socket (ctx_, XS_PUSH);
assert (sc);
int rc = xs_connect (sc, "inproc://timeout_test");
- assert (rc == 0);
+ assert (rc != -1);
sleep (1);
rc = xs_close (sc);
assert (rc == 0);
@@ -48,7 +48,7 @@ int XS_TEST_MAIN ()
void *sb = xs_socket (ctx, XS_PULL);
assert (sb);
int rc = xs_bind (sb, "inproc://timeout_test");
- assert (rc == 0);
+ assert (rc != -1);
// Check whether non-blocking recv returns immediately.
char buf [] = "12345678ABCDEFGH12345678abcdefgh";
@@ -90,7 +90,7 @@ int XS_TEST_MAIN ()
rc = xs_setsockopt(sb, XS_SNDTIMEO, &timeout, timeout_size);
assert (rc == 0);
rc = xs_connect (sc, "inproc://timeout_test");
- assert (rc == 0);
+ assert (rc != -1);
rc = xs_send (sc, buf, 32, 0);
assert (rc == 32);
rc = xs_recv (sb, buf, 32, 0);