aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol')
-rw-r--r--src/sp/protocol/bus0/bus_test.c5
-rw-r--r--src/sp/protocol/pair0/pair0_test.c6
-rw-r--r--src/sp/protocol/pair1/pair1_test.c6
-rw-r--r--src/sp/protocol/pipeline0/pull_test.c2
-rw-r--r--src/sp/protocol/pipeline0/push_test.c2
-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
-rw-r--r--src/sp/protocol/reqrep0/xrep_test.c2
-rw-r--r--src/sp/protocol/reqrep0/xreq_test.c2
-rw-r--r--src/sp/protocol/survey0/xrespond_test.c2
-rw-r--r--src/sp/protocol/survey0/xsurvey_test.c2
12 files changed, 16 insertions, 22 deletions
diff --git a/src/sp/protocol/bus0/bus_test.c b/src/sp/protocol/bus0/bus_test.c
index 7a9e4a8b..3fb2aa56 100644
--- a/src/sp/protocol/bus0/bus_test.c
+++ b/src/sp/protocol/bus0/bus_test.c
@@ -371,14 +371,13 @@ test_bus_cooked(void)
bool b;
NUTS_PASS(nng_bus0_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_bus0_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/pair0/pair0_test.c b/src/sp/protocol/pair0/pair0_test.c
index 0cdfb789..c2bcb7ac 100644
--- a/src/sp/protocol/pair0/pair0_test.c
+++ b/src/sp/protocol/pair0/pair0_test.c
@@ -225,15 +225,13 @@ test_pair0_raw(void)
bool raw;
NUTS_PASS(nng_pair0_open(&s1));
- NUTS_PASS(nng_socket_get_bool(s1, NNG_OPT_RAW, &raw));
+ NUTS_PASS(nng_socket_raw(s1, &raw));
NUTS_TRUE(raw == false);
- NUTS_FAIL(nng_socket_set_bool(s1, NNG_OPT_RAW, true), NNG_EREADONLY);
NUTS_PASS(nng_close(s1));
NUTS_PASS(nng_pair0_open_raw(&s1));
- NUTS_PASS(nng_socket_get_bool(s1, NNG_OPT_RAW, &raw));
+ NUTS_PASS(nng_socket_raw(s1, &raw));
NUTS_TRUE(raw == true);
- NUTS_FAIL(nng_socket_set_bool(s1, NNG_OPT_RAW, false), NNG_EREADONLY);
NUTS_PASS(nng_close(s1));
}
diff --git a/src/sp/protocol/pair1/pair1_test.c b/src/sp/protocol/pair1/pair1_test.c
index e0e6b3b2..8c6d433e 100644
--- a/src/sp/protocol/pair1/pair1_test.c
+++ b/src/sp/protocol/pair1/pair1_test.c
@@ -291,15 +291,13 @@ test_pair1_raw(void)
bool raw;
NUTS_PASS(nng_pair1_open(&s1));
- NUTS_PASS(nng_socket_get_bool(s1, NNG_OPT_RAW, &raw));
+ NUTS_PASS(nng_socket_raw(s1, &raw));
NUTS_TRUE(raw == false);
- NUTS_FAIL(nng_socket_set_bool(s1, NNG_OPT_RAW, true), NNG_EREADONLY);
NUTS_PASS(nng_close(s1));
NUTS_PASS(nng_pair1_open_raw(&s1));
- NUTS_PASS(nng_socket_get_bool(s1, NNG_OPT_RAW, &raw));
+ NUTS_PASS(nng_socket_raw(s1, &raw));
NUTS_TRUE(raw == true);
- NUTS_FAIL(nng_socket_set_bool(s1, NNG_OPT_RAW, false), NNG_EREADONLY);
NUTS_PASS(nng_close(s1));
}
diff --git a/src/sp/protocol/pipeline0/pull_test.c b/src/sp/protocol/pipeline0/pull_test.c
index 59dcf8a8..74fd6046 100644
--- a/src/sp/protocol/pipeline0/pull_test.c
+++ b/src/sp/protocol/pipeline0/pull_test.c
@@ -241,7 +241,7 @@ test_pull_cooked(void)
bool b;
NUTS_PASS(nng_pull0_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/pipeline0/push_test.c b/src/sp/protocol/pipeline0/push_test.c
index be60ba50..dd3328f3 100644
--- a/src/sp/protocol/pipeline0/push_test.c
+++ b/src/sp/protocol/pipeline0/push_test.c
@@ -410,7 +410,7 @@ test_push_cooked(void)
bool b;
NUTS_PASS(nng_push0_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/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);
}
diff --git a/src/sp/protocol/reqrep0/xrep_test.c b/src/sp/protocol/reqrep0/xrep_test.c
index c1a7cb62..3c033e9b 100644
--- a/src/sp/protocol/reqrep0/xrep_test.c
+++ b/src/sp/protocol/reqrep0/xrep_test.c
@@ -37,7 +37,7 @@ test_xrep_raw(void)
bool b;
NUTS_PASS(nng_rep0_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/reqrep0/xreq_test.c b/src/sp/protocol/reqrep0/xreq_test.c
index 7e09ce5a..e8725acb 100644
--- a/src/sp/protocol/reqrep0/xreq_test.c
+++ b/src/sp/protocol/reqrep0/xreq_test.c
@@ -37,7 +37,7 @@ test_xreq_raw(void)
bool b;
NUTS_PASS(nng_req0_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/survey0/xrespond_test.c b/src/sp/protocol/survey0/xrespond_test.c
index 1522d1ed..2e4cd743 100644
--- a/src/sp/protocol/survey0/xrespond_test.c
+++ b/src/sp/protocol/survey0/xrespond_test.c
@@ -37,7 +37,7 @@ test_xresp_raw(void)
bool b;
NUTS_PASS(nng_respondent0_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/survey0/xsurvey_test.c b/src/sp/protocol/survey0/xsurvey_test.c
index 41c76cb2..d55719af 100644
--- a/src/sp/protocol/survey0/xsurvey_test.c
+++ b/src/sp/protocol/survey0/xsurvey_test.c
@@ -36,7 +36,7 @@ test_xsurveyor_raw(void)
bool b;
NUTS_PASS(nng_surveyor0_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);
}