diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-01-05 16:30:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-01-06 12:12:27 -0800 |
| commit | 6d0027fae75e4810d66eb4c5817255ffa517e158 (patch) | |
| tree | 9bd36c16cf293e4335ab0650e226a335029012ad /src/transport | |
| parent | 68c6310ee83078d6ad6af0c9ccddef11b8f8b7c2 (diff) | |
| download | nng-6d0027fae75e4810d66eb4c5817255ffa517e158.tar.gz nng-6d0027fae75e4810d66eb4c5817255ffa517e158.tar.bz2 nng-6d0027fae75e4810d66eb4c5817255ffa517e158.zip | |
fixes #839 TCP listener_start API should use constant sockaddr
Diffstat (limited to 'src/transport')
| -rw-r--r-- | src/transport/tcp/tcp.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c index 38b8cbaf..30695918 100644 --- a/src/transport/tcp/tcp.c +++ b/src/transport/tcp/tcp.c @@ -989,57 +989,6 @@ tcptran_ep_set_recvmaxsz(void *arg, const void *v, size_t sz, nni_opt_type t) } static int -tcptran_ep_get_nodelay(void *arg, void *v, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_bool(ep->nodelay, v, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - -static int -tcptran_ep_set_nodelay(void *arg, const void *v, size_t sz, nni_opt_type t) -{ - tcptran_ep *ep = arg; - bool val; - int rv; - if (((rv = nni_copyin_bool(&val, v, sz, t)) == 0) && (ep != NULL)) { - nni_mtx_lock(&ep->mtx); - ep->nodelay = val; - nni_mtx_unlock(&ep->mtx); - } - return (rv); -} - -static int -tcptran_ep_get_keepalive(void *arg, void *v, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_bool(ep->keepalive, v, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - -static int -tcptran_ep_set_keepalive(void *arg, const void *v, size_t sz, nni_opt_type t) -{ - tcptran_ep *ep = arg; - bool val; - int rv; - if (((rv = nni_copyin_bool(&val, v, sz, t)) == 0) && (ep != NULL)) { - nni_mtx_lock(&ep->mtx); - ep->keepalive = val; - nni_mtx_unlock(&ep->mtx); - } - return (rv); -} - -static int tcptran_ep_bind(void *arg) { tcptran_ep *ep = arg; @@ -1082,18 +1031,6 @@ tcptran_ep_accept(void *arg, nni_aio *aio) nni_mtx_unlock(&ep->mtx); } -static int -tcptran_ep_get_locaddr(void *arg, void *buf, size_t *szp, nni_opt_type t) -{ - tcptran_ep *ep = arg; - int rv; - - nni_mtx_lock(&ep->mtx); - rv = nni_copyout_sockaddr(&ep->bsa, buf, szp, t); - nni_mtx_unlock(&ep->mtx); - return (rv); -} - static nni_tran_pipe_ops tcptran_pipe_ops = { .p_init = tcptran_pipe_init, .p_fini = tcptran_pipe_fini, |
