From 1d69c8f0393337d4f222cc1af1af813d77922c84 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 27 Oct 2025 07:11:12 -0700 Subject: Remove the ability to get sockaddrs from endpoints. There is no valid use for this, once we added the ability to query the bound port. --- src/platform/windows/win_tcpdial.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/platform/windows') diff --git a/src/platform/windows/win_tcpdial.c b/src/platform/windows/win_tcpdial.c index a3d64869..c03d564f 100644 --- a/src/platform/windows/win_tcpdial.c +++ b/src/platform/windows/win_tcpdial.c @@ -310,20 +310,6 @@ tcp_dialer_get_keepalive(void *arg, void *buf, size_t *szp, nni_type t) return (nni_copyout_bool(b, buf, szp, t)); } -static nng_err -tcp_dialer_get_locaddr(void *arg, void *buf, size_t *szp, nni_type t) -{ - nni_tcp_dialer *d = arg; - nng_sockaddr sa; - - nni_mtx_lock(&d->mtx); - if (nni_win_sockaddr2nn(&sa, &d->src, sizeof(d->src)) != 0) { - sa.s_family = NNG_AF_UNSPEC; - } - nni_mtx_unlock(&d->mtx); - return (nni_copyout_sockaddr(&sa, buf, szp, t)); -} - static nng_err tcp_dialer_set_locaddr(void *arg, const void *buf, size_t sz, nni_type t) { @@ -380,7 +366,6 @@ tcp_dialer_set_locaddr(void *arg, const void *buf, size_t sz, nni_type t) static const nni_option tcp_dialer_options[] = { { .o_name = NNG_OPT_LOCADDR, - .o_get = tcp_dialer_get_locaddr, .o_set = tcp_dialer_set_locaddr, }, { -- cgit v1.2.3-70-g09d2