From 801ace5e9adca4e53497d6c7133cc32cf94b23b7 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 28 Oct 2024 15:53:23 -0700 Subject: Remove nng_stream_set function family. This was not really used or useful. --- src/platform/windows/win_tcpconn.c | 39 -------------------------------------- 1 file changed, 39 deletions(-) (limited to 'src/platform/windows') diff --git a/src/platform/windows/win_tcpconn.c b/src/platform/windows/win_tcpconn.c index eaae822a..3f3acd17 100644 --- a/src/platform/windows/win_tcpconn.c +++ b/src/platform/windows/win_tcpconn.c @@ -304,43 +304,6 @@ tcp_get_sockname(void *arg, void *buf, size_t *szp, nni_type t) return (nni_copyout_sockaddr(&sa, buf, szp, t)); } -static int -tcp_set_nodelay(void *arg, const void *buf, size_t sz, nni_type t) -{ - nni_tcp_conn *c = arg; - bool val; - BOOL b; - int rv; - if ((rv = nni_copyin_bool(&val, buf, sz, t)) != 0) { - return (rv); - } - b = val ? TRUE : FALSE; - if (setsockopt( - c->s, IPPROTO_TCP, TCP_NODELAY, (void *) &b, sizeof(b)) != 0) { - return (nni_win_error(WSAGetLastError())); - } - return (0); -} - -static int -tcp_set_keepalive(void *arg, const void *buf, size_t sz, nni_type t) -{ - nni_tcp_conn *c = arg; - bool val; - BOOL b; - int rv; - - if ((rv = nni_copyin_bool(&val, buf, sz, t)) != 0) { - return (rv); - } - b = val ? TRUE : FALSE; - if (setsockopt( - c->s, SOL_SOCKET, SO_KEEPALIVE, (void *) &b, sizeof(b)) != 0) { - return (nni_win_error(WSAGetLastError())); - } - return (0); -} - static int tcp_get_nodelay(void *arg, void *buf, size_t *szp, nni_type t) { @@ -381,12 +344,10 @@ static const nni_option tcp_options[] = { { .o_name = NNG_OPT_TCP_NODELAY, .o_get = tcp_get_nodelay, - .o_set = tcp_set_nodelay, }, { .o_name = NNG_OPT_TCP_KEEPALIVE, .o_get = tcp_get_keepalive, - .o_set = tcp_set_keepalive, }, { .o_name = NULL, -- cgit v1.2.3-70-g09d2