From 279180c1d07fc2c4c0bfa8f5a418cb02c4b87863 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 2 Nov 2024 13:57:53 -0700 Subject: NNG_OPT_RECVFD and NNG_OPT_SENDFD converted to functions. These options are removed entirely, and their functionality is now available via special functions, `nng_socket_get_send_poll_fd` and `nng_socket_get_recv_poll_fd`, making these first class methods on the socket. This eliminates a bit of wasteful code, and provides type safety for these methods. --- src/core/sock_test.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/core/sock_test.c') diff --git a/src/core/sock_test.c b/src/core/sock_test.c index f785d9c0..7641ea1f 100644 --- a/src/core/sock_test.c +++ b/src/core/sock_test.c @@ -78,16 +78,6 @@ test_send_nonblock(void) NUTS_CLOSE(s1); } -void -test_readonly_options(void) -{ - nng_socket s1; - NUTS_OPEN(s1); - NUTS_FAIL(nng_socket_set_int(s1, NNG_OPT_RECVFD, 0), NNG_EREADONLY); - NUTS_FAIL(nng_socket_set_int(s1, NNG_OPT_SENDFD, 0), NNG_EREADONLY); - NUTS_CLOSE(s1); -} - void test_socket_base(void) { @@ -596,7 +586,6 @@ NUTS_TESTS = { { "recv non-block", test_recv_nonblock }, { "send timeout", test_send_timeout }, { "send non-block", test_send_nonblock }, - { "read only options", test_readonly_options }, { "socket base", test_socket_base }, { "socket name", test_socket_name }, { "socket name oversize", test_socket_name_oversize }, -- cgit v1.2.3-70-g09d2