aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-25 19:02:30 -0800
committerGarrett D'Amore <garrett@saucelabs.com>2016-12-27 20:42:03 -0800
commitca74e80e9b0695a1c374840058025e567189dd14 (patch)
treee707312a06fca922dfe97cdcb8b04615282f0875 /tests
parent0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c (diff)
downloadnng-ca74e80e9b0695a1c374840058025e567189dd14.tar.gz
nng-ca74e80e9b0695a1c374840058025e567189dd14.tar.bz2
nng-ca74e80e9b0695a1c374840058025e567189dd14.zip
Buffer resizing implemented. (Needed for single threaded inproc tests.)
Diffstat (limited to 'tests')
-rw-r--r--tests/sock.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/sock.c b/tests/sock.c
index 1179dca9..7ba4b3c4 100644
--- a/tests/sock.c
+++ b/tests/sock.c
@@ -139,5 +139,22 @@ TestMain("Socket Operations", {
nng_close(sock2);
})
})
+
+ Convey("We can send and receive messages", {
+ nng_socket *sock2 = NULL;
+ int len = 1;
+ rv = nng_open(&sock2, NNG_PROTO_PAIR);
+ So(rv == 0);
+
+ rv = nng_setopt(sock, NNG_OPT_RCVBUF, &len, sizeof (len));
+ So(rv == 0);
+ rv = nng_setopt(sock, NNG_OPT_SNDBUF, &len, sizeof (len));
+ So(rv == 0);
+
+ rv = nng_setopt(sock2, NNG_OPT_RCVBUF, &len, sizeof (len));
+ So(rv == 0);
+ rv = nng_setopt(sock2, NNG_OPT_SNDBUF, &len, sizeof (len));
+ So(rv == 0);
+ })
})
}) \ No newline at end of file