diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-23 08:00:53 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-23 08:00:53 -0800 |
| commit | d142185f3fa980e6099c3f07d37ad2c327e031c6 (patch) | |
| tree | 74232e62a0b8cb34720a1836f96cafebf5785e9a | |
| parent | 49ce5d1b557d3f6477fb5a478c32ab34a92308d9 (diff) | |
| download | nng-d142185f3fa980e6099c3f07d37ad2c327e031c6.tar.gz nng-d142185f3fa980e6099c3f07d37ad2c327e031c6.tar.bz2 nng-d142185f3fa980e6099c3f07d37ad2c327e031c6.zip | |
core: remove NNG_OPT_URL entirely
| -rw-r--r-- | include/nng/nng.h | 1 | ||||
| -rw-r--r-- | src/core/dialer.c | 10 | ||||
| -rw-r--r-- | src/core/listener.c | 11 | ||||
| -rw-r--r-- | src/core/sock_test.c | 8 |
4 files changed, 0 insertions, 30 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h index bd6b526d..658968d5 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -729,7 +729,6 @@ NNG_DECL nng_listener nng_pipe_listener(nng_pipe); #define NNG_OPT_SENDTIMEO "send-timeout" #define NNG_OPT_LOCADDR "local-address" #define NNG_OPT_REMADDR "remote-address" -#define NNG_OPT_URL "url" #define NNG_OPT_MAXTTL "ttl-max" #define NNG_OPT_RECVMAXSZ "recv-size-max" #define NNG_OPT_RECONNMINT "reconnect-time-min" diff --git a/src/core/dialer.c b/src/core/dialer.c index 5e44cbff..dfa198c5 100644 --- a/src/core/dialer.c +++ b/src/core/dialer.c @@ -454,9 +454,6 @@ nni_dialer_setopt( { nni_option *o; - if (strcmp(name, NNG_OPT_URL) == 0) { - return (NNG_EREADONLY); - } if (strcmp(name, NNG_OPT_RECONNMAXT) == 0) { int rv; nni_mtx_lock(&d->d_mtx); @@ -533,13 +530,6 @@ nni_dialer_getopt( return (o->o_get(d->d_data, valp, szp, t)); } - // We provide a fallback on the URL, but let the implementation - // override. This allows the URL to be created with wildcards, - // that are resolved later. - if (strcmp(name, NNG_OPT_URL) == 0) { - return (nni_copyout_str(d->d_url.u_rawurl, valp, szp, t)); - } - return (nni_sock_getopt(d->d_sock, name, valp, szp, t)); } diff --git a/src/core/listener.c b/src/core/listener.c index 10096559..eedfbc42 100644 --- a/src/core/listener.c +++ b/src/core/listener.c @@ -430,10 +430,6 @@ nni_listener_setopt( { nni_option *o; - if (strcmp(name, NNG_OPT_URL) == 0) { - return (NNG_EREADONLY); - } - if (l->l_ops.l_setopt != NULL) { int rv = l->l_ops.l_setopt(l->l_data, name, val, sz, t); if (rv != NNG_ENOTSUP) { @@ -478,13 +474,6 @@ nni_listener_getopt( return (o->o_get(l->l_data, val, szp, t)); } - // We provide a fallback on the URL, but let the implementation - // override. This allows the URL to be created with wildcards, - // that are resolved later. - if (strcmp(name, NNG_OPT_URL) == 0) { - return (nni_copyout_str(l->l_url.u_rawurl, val, szp, t)); - } - return (nni_sock_getopt(l->l_sock, name, val, szp, t)); } diff --git a/src/core/sock_test.c b/src/core/sock_test.c index 28f75a95..0e8c6d29 100644 --- a/src/core/sock_test.c +++ b/src/core/sock_test.c @@ -341,10 +341,6 @@ test_listener_options(void) // Cannot set inappropriate options NUTS_FAIL(nng_listener_set_ms(l, NNG_OPT_RECONNMINT, 1), NNG_ENOTSUP); - // Read only options - NUTS_FAIL(nng_listener_set_string(l, NNG_OPT_URL, "inproc://junk"), - NNG_EREADONLY); - NUTS_CLOSE(s1); } @@ -370,10 +366,6 @@ test_dialer_options(void) // Cannot set inappropriate options NUTS_FAIL(nng_dialer_set_ms(d, NNG_OPT_SENDTIMEO, 1), NNG_ENOTSUP); - // Read only options - NUTS_FAIL(nng_dialer_set_string(d, NNG_OPT_URL, "inproc://junk"), - NNG_EREADONLY); - NUTS_CLOSE(s1); } |
