aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/bus0/bus_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol/bus0/bus_test.c')
-rw-r--r--src/sp/protocol/bus0/bus_test.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp/protocol/bus0/bus_test.c b/src/sp/protocol/bus0/bus_test.c
index a832d9dd..7e049e34 100644
--- a/src/sp/protocol/bus0/bus_test.c
+++ b/src/sp/protocol/bus0/bus_test.c
@@ -7,6 +7,7 @@
// found online at https://opensource.org/licenses/MIT.
//
+#include "nng/nng.h"
#include <nuts.h>
#include <nng/protocol/bus0/bus.h>
@@ -244,7 +245,7 @@ test_bus_poll_readable(void)
NUTS_PASS(nng_bus0_open(&s2));
NUTS_PASS(nng_socket_set_ms(s1, NNG_OPT_RECVTIMEO, 1000));
NUTS_PASS(nng_socket_set_ms(s2, NNG_OPT_SENDTIMEO, 1000));
- NUTS_PASS(nng_socket_get_int(s1, NNG_OPT_RECVFD, &fd));
+ NUTS_PASS(nng_socket_get_recv_poll_fd(s1, &fd));
NUTS_TRUE(fd >= 0);
// Not readable if not connected!
@@ -277,10 +278,10 @@ test_bus_poll_writeable(void)
NUTS_PASS(nng_bus0_open(&s1));
NUTS_PASS(nng_bus0_open(&s2));
NUTS_PASS(nng_socket_set_int(s2, NNG_OPT_SENDBUF, 1));
- NUTS_PASS(nng_socket_get_int(s2, NNG_OPT_SENDFD, &fd));
+ NUTS_PASS(nng_socket_get_send_poll_fd(s2, &fd));
NUTS_TRUE(fd >= 0);
- // Pub is *always* writeable
+ // Bus is *always* writeable
NUTS_TRUE(nuts_poll_fd(fd));
// Even after connect (no message yet)