diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-28 15:53:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-28 16:13:11 -0700 |
| commit | 801ace5e9adca4e53497d6c7133cc32cf94b23b7 (patch) | |
| tree | 8bbfb96e513fedce9b2cb29672f99fce0c5d54bd /src/platform/windows | |
| parent | caa0c875339badd5a0da38aee9605a40cb7e9d83 (diff) | |
| download | nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.tar.gz nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.tar.bz2 nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.zip | |
Remove nng_stream_set function family.
This was not really used or useful.
Diffstat (limited to 'src/platform/windows')
| -rw-r--r-- | src/platform/windows/win_tcpconn.c | 39 |
1 files changed, 0 insertions, 39 deletions
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 @@ -305,43 +305,6 @@ tcp_get_sockname(void *arg, void *buf, size_t *szp, nni_type 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) { nni_tcp_conn *c = arg; @@ -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, |
