From be13c2e8845423cec17af429fc4e16a5d9749e47 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 26 Oct 2025 10:54:58 -0700 Subject: Replace nng_pipe_get_addr, nng_stream_get_addr, and the NNG_OPT_REMADDR option. More direct access methods are provided instead. This results in much lower friction when using, and is a step on the path to removing NNG_OPT_LOCADDR as well. We need to figure a solution for NNG_OPT_LOCADDR for dialers; for listeners there is little use in it either, and it will be removed. (Dialers will probably get a new NNG_OPT_BIND_IP option.) --- src/core/sockfd.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/core/sockfd.c') diff --git a/src/core/sockfd.c b/src/core/sockfd.c index 3fa109a4..f184813d 100644 --- a/src/core/sockfd.c +++ b/src/core/sockfd.c @@ -173,24 +173,11 @@ sfd_listener_set_fd(void *arg, const void *buf, size_t sz, nni_type t) return (NNG_OK); } -static nng_err -sfd_listener_get_addr(void *arg, void *buf, size_t *szp, nni_type t) -{ - NNI_ARG_UNUSED(arg); - nng_sockaddr sa; - sa.s_family = NNG_AF_UNSPEC; - return (nni_copyout_sockaddr(&sa, buf, szp, t)); -} - static const nni_option sfd_listener_options[] = { { .o_name = NNG_OPT_SOCKET_FD, .o_set = sfd_listener_set_fd, }, - { - .o_name = NNG_OPT_LOCADDR, - .o_get = sfd_listener_get_addr, - }, { .o_name = NULL, }, -- cgit v1.2.3-70-g09d2