diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sock.c | 17 |
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 |
