From 2cf6c5b96de05ca3870495f615b23e1fcdd3c4ca Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Dec 2016 11:03:06 -0800 Subject: New dial/listen API. Dialing might work now. In order to give control over synchronous vs. async dialing, we provide a flag to indicate synchronous dialing is desired. (Hmm. Should we reverse the default sense?) We extend listen to have the same flag. Logic is moved to endpt.c since dialing is really and endpoint specific operation. There are other minor related bug fixes here too. --- tests/sock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/sock.c') diff --git a/tests/sock.c b/tests/sock.c index 65ed5565..c4fcbee0 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -100,5 +100,15 @@ TestMain("Socket Operations", { So(check == 1234); }) }) + + Convey("Dialing bogus address not supported", { + rv = nng_dial(sock, "bogus://somewhere", NULL, 0); + So(rv == NNG_ENOTSUP); + }) + + Convey("Dialing synch can get refused", { + rv = nng_dial(sock, "inproc://notthere", NULL, NNG_FLAG_SYNCH); + So(rv == NNG_ECONNREFUSED); + }) }) }) \ No newline at end of file -- cgit v1.2.3-70-g09d2