From 6e945e18f3f3e9b7f9ee614eac6d3bf681f768d9 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Oct 2017 13:34:55 -0700 Subject: Added more complete tests, and changes to property handling. We allow some properties to be set on endpoints after they are started; transports now responsible for checking that. (The new values will only apply to new connections of course!) We added short-hand functions for pipe properties, and also added uint64_t shorthands across the board. The zerotier documentation got some updates (corrections). We have also added a separate header now for the ZT stuff. Also, dialers and listeners do not intermix anymore -- we test that only a dialer can be used with setting dialer options, and likewise for listeners. --- tests/sock.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'tests/sock.c') diff --git a/tests/sock.c b/tests/sock.c index ca125214..f2afde4c 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -426,33 +426,6 @@ TestMain("Socket Operations", { }); - Convey("Cannot set dialer opts when running", { - nng_dialer ep; - char addr[NNG_MAXADDRLEN]; - - trantest_next_address(addr, "ipc:///tmp/sock_test_%u"); - So(nng_dialer_create(&ep, s1, addr) == 0); - So(nng_dialer_start(ep, NNG_FLAG_NONBLOCK) == 0); - So(nng_dialer_setopt_size(ep, NNG_OPT_RECVMAXSZ, 10) == - NNG_ESTATE); - So(nng_dialer_close(ep) == 0); - So(nng_dialer_close(ep) == NNG_ENOENT); - }); - - Convey("Cannot set listener opts when running", { - nng_listener ep; - char addr[NNG_MAXADDRLEN]; - - trantest_next_address(addr, "ipc:///tmp/sock_test_%u"); - - So(nng_listener_create(&ep, s1, addr) == 0); - So(nng_listener_start(ep, 0) == 0); - So(nng_listener_setopt_size( - ep, NNG_OPT_RECVMAXSZ, 10) == NNG_ESTATE); - So(nng_listener_close(ep) == 0); - So(nng_listener_close(ep) == NNG_ENOENT); - }); - Convey("We can send and receive messages", { nng_socket s2; int len; -- cgit v1.2.3-70-g09d2