diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-01 15:38:19 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-01 15:40:54 -0800 |
| commit | 46117f86d47da376b37c6fb4d72ee202de599c9b (patch) | |
| tree | 0eae4d42b2fce56163cd5fa1c361038567c46371 /demo/async/client.c | |
| parent | 6cd521d5e68318ab3a93cb0e9cd4ee793576a643 (diff) | |
| download | nng-46117f86d47da376b37c6fb4d72ee202de599c9b.tar.gz nng-46117f86d47da376b37c6fb4d72ee202de599c9b.tar.bz2 nng-46117f86d47da376b37c6fb4d72ee202de599c9b.zip | |
demos: raw and async demos should use nng_init
Diffstat (limited to 'demo/async/client.c')
| -rw-r--r-- | demo/async/client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/demo/async/client.c b/demo/async/client.c index bf9389a0..18622089 100644 --- a/demo/async/client.c +++ b/demo/async/client.c @@ -1,4 +1,4 @@ -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitoar.com> // // This software is supplied under the terms of the MIT License, a @@ -26,7 +26,6 @@ #include <time.h> #include <nng/nng.h> -#include <nng/protocol/reqrep0/req.h> #include <nng/supplemental/util/platform.h> void @@ -49,6 +48,10 @@ client(const char *url, const char *msecstr) msec = atoi(msecstr); + if ((rv = nng_init(NULL)) != 0) { + fatal("nng_init", rv); + } + if ((rv = nng_req0_open(&sock)) != 0) { fatal("nng_req0_open", rv); } |
