aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pubsub0
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-02 23:54:27 -0700
committerGarrett D'Amore <garrett@damore.org>2024-11-02 23:54:27 -0700
commit02ec0b55cbee5de4d0fd688ce0ebddf08178dc98 (patch)
tree6cb65f860f8f9992b14139f52bf065c48f7b5a58 /src/sp/protocol/pubsub0
parent8bac5ccdf1de7334311459b9e2666e74a2c16c15 (diff)
downloadnng-02ec0b55cbee5de4d0fd688ce0ebddf08178dc98.tar.gz
nng-02ec0b55cbee5de4d0fd688ce0ebddf08178dc98.tar.bz2
nng-02ec0b55cbee5de4d0fd688ce0ebddf08178dc98.zip
Replace `NNG_OPT_RAW` with `nng_socket_raw`.
Similar to the other identities, this simplifies code a bit.
Diffstat (limited to 'src/sp/protocol/pubsub0')
-rw-r--r--src/sp/protocol/pubsub0/pub_test.c5
-rw-r--r--src/sp/protocol/pubsub0/sub_test.c2
-rw-r--r--src/sp/protocol/pubsub0/xsub_test.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/sp/protocol/pubsub0/pub_test.c b/src/sp/protocol/pubsub0/pub_test.c
index 5f0ef01e..733d6fb5 100644
--- a/src/sp/protocol/pubsub0/pub_test.c
+++ b/src/sp/protocol/pubsub0/pub_test.c
@@ -298,14 +298,13 @@ test_pub_cooked(void)
bool b;
NUTS_PASS(nng_pub0_open(&s));
- NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_RAW, &b));
+ NUTS_PASS(nng_socket_raw(s, &b));
NUTS_TRUE(!b);
- NUTS_FAIL(nng_socket_set_bool(s, NNG_OPT_RAW, true), NNG_EREADONLY);
NUTS_PASS(nng_close(s));
// raw pub only differs in the option setting
NUTS_PASS(nng_pub0_open_raw(&s));
- NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_RAW, &b));
+ NUTS_PASS(nng_socket_raw(s, &b));
NUTS_TRUE(b);
NUTS_CLOSE(s);
}
diff --git a/src/sp/protocol/pubsub0/sub_test.c b/src/sp/protocol/pubsub0/sub_test.c
index b823d486..9802a35e 100644
--- a/src/sp/protocol/pubsub0/sub_test.c
+++ b/src/sp/protocol/pubsub0/sub_test.c
@@ -576,7 +576,7 @@ test_sub_cooked(void)
bool b;
NUTS_PASS(nng_sub0_open(&s));
- NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_RAW, &b));
+ NUTS_PASS(nng_socket_raw(s, &b));
NUTS_TRUE(!b);
NUTS_CLOSE(s);
}
diff --git a/src/sp/protocol/pubsub0/xsub_test.c b/src/sp/protocol/pubsub0/xsub_test.c
index 8e5568c4..eec73505 100644
--- a/src/sp/protocol/pubsub0/xsub_test.c
+++ b/src/sp/protocol/pubsub0/xsub_test.c
@@ -283,7 +283,7 @@ test_xsub_raw(void)
bool b;
NUTS_PASS(nng_sub0_open_raw(&s));
- NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_RAW, &b));
+ NUTS_PASS(nng_socket_raw(s, &b));
NUTS_TRUE(b);
NUTS_CLOSE(s);
}