diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-03 00:51:15 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-03 00:58:37 -0700 |
| commit | b3fc8a44119d7ab90366a1b92a5e1327ebcb8145 (patch) | |
| tree | 994c0199184fdea3d56eeb61b252e10733588947 /src/tools | |
| parent | 02ec0b55cbee5de4d0fd688ce0ebddf08178dc98 (diff) | |
| download | nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.tar.gz nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.tar.bz2 nng-b3fc8a44119d7ab90366a1b92a5e1327ebcb8145.zip | |
Replace NNG_OPT_SUB_SUBSCRIBE/UNSUBSCRIBE with functions.
The main purpose is to eliminate the NNI_TYPE_OPAQUE options,
by putting these into their own first class, protocol-specific, functions.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/nngcat/nngcat.c | 3 | ||||
| -rw-r--r-- | src/tools/perf/pubdrop.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/nngcat/nngcat.c b/src/tools/nngcat/nngcat.c index bdf6823c..da3bd6d6 100644 --- a/src/tools/nngcat/nngcat.c +++ b/src/tools/nngcat/nngcat.c @@ -1065,8 +1065,7 @@ main(int ac, char **av) } for (struct topic *t = topics; t != NULL; t = t->next) { - rv = nng_socket_set( - sock, NNG_OPT_SUB_SUBSCRIBE, t->val, strlen(t->val)); + rv = nng_sub0_socket_subscribe(sock, t->val, strlen(t->val)); if (rv != 0) { fatal("Unable to subscribe to topic %s: %s", t->val, nng_strerror(rv)); diff --git a/src/tools/perf/pubdrop.c b/src/tools/perf/pubdrop.c index 0e493116..27d7802a 100644 --- a/src/tools/perf/pubdrop.c +++ b/src/tools/perf/pubdrop.c @@ -206,7 +206,7 @@ sub_client(void *arg) if ((rv = nng_socket_set_ms(sock, NNG_OPT_RECONNMINT, 51)) != 0) { die("setopt: %s", nng_strerror(rv)); } - if ((rv = nng_socket_set(sock, NNG_OPT_SUB_SUBSCRIBE, "", 0)) != 0) { + if ((rv = nng_sub0_socket_subscribe(sock, "", 0)) != 0) { die("setopt: %s", nng_strerror(rv)); } if ((rv = nng_socket_set_ms(sock, NNG_OPT_RECVTIMEO, 10000)) != 0) { |
