aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pipeline0/pull_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol/pipeline0/pull_test.c')
-rw-r--r--src/sp/protocol/pipeline0/pull_test.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/sp/protocol/pipeline0/pull_test.c b/src/sp/protocol/pipeline0/pull_test.c
index 6be5c2f5..59dcf8a8 100644
--- a/src/sp/protocol/pipeline0/pull_test.c
+++ b/src/sp/protocol/pipeline0/pull_test.c
@@ -13,21 +13,19 @@
static void
test_pull_identity(void)
{
- nng_socket s;
- int p;
- char *n;
+ nng_socket s;
+ uint16_t p;
+ const char *n;
NUTS_PASS(nng_pull0_open(&s));
- NUTS_PASS(nng_socket_get_int(s, NNG_OPT_PROTO, &p));
+ NUTS_PASS(nng_socket_proto_id(s, &p));
NUTS_TRUE(p == NUTS_PROTO(5u, 1u)); // 81
- NUTS_PASS(nng_socket_get_int(s, NNG_OPT_PEER, &p));
+ NUTS_PASS(nng_socket_peer_id(s, &p));
NUTS_TRUE(p == NUTS_PROTO(5u, 0u)); // 80
- NUTS_PASS(nng_socket_get_string(s, NNG_OPT_PROTONAME, &n));
+ NUTS_PASS(nng_socket_proto_name(s, &n));
NUTS_MATCH(n, "pull");
- nng_strfree(n);
- NUTS_PASS(nng_socket_get_string(s, NNG_OPT_PEERNAME, &n));
+ NUTS_PASS(nng_socket_peer_name(s, &n));
NUTS_MATCH(n, "push");
- nng_strfree(n);
NUTS_CLOSE(s);
}