diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-20 23:43:44 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-20 23:43:44 -0700 |
| commit | 53e8dbbe3c2bd82fb7ac8583a45e7fcfec173cc1 (patch) | |
| tree | 173a51c6094fc9aecb9f8baea550a5c3ac29974c /src/sp/transport/tcp/tcp_test.c | |
| parent | d05ff4934e57c55841a12a41eea41934267150ae (diff) | |
| download | nng-53e8dbbe3c2bd82fb7ac8583a45e7fcfec173cc1.tar.gz nng-53e8dbbe3c2bd82fb7ac8583a45e7fcfec173cc1.tar.bz2 nng-53e8dbbe3c2bd82fb7ac8583a45e7fcfec173cc1.zip | |
remove legacy support for configuration of transport options on socket
Transport specific options should be configured on the end point.
This has the most impact for TLS, as TLS dialers and listeners will
need to be allocated apriori, to configure TLS options.
Some legacy tests were removed... we're going to remove the legacy
libnanomsg compatibility layer anyway.
Diffstat (limited to 'src/sp/transport/tcp/tcp_test.c')
| -rw-r--r-- | src/sp/transport/tcp/tcp_test.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/sp/transport/tcp/tcp_test.c b/src/sp/transport/tcp/tcp_test.c index 005fd2b0..5a4e5647 100644 --- a/src/sp/transport/tcp/tcp_test.c +++ b/src/sp/transport/tcp/tcp_test.c @@ -144,10 +144,6 @@ test_tcp_no_delay_option(void) NUTS_ADDR(addr, "tcp"); NUTS_OPEN(s); -#ifndef NNG_ELIDE_DEPRECATED - NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_TCP_NODELAY, &v)); - NUTS_TRUE(v); -#endif NUTS_PASS(nng_dialer_create(&d, s, addr)); NUTS_PASS(nng_dialer_get_bool(d, NNG_OPT_TCP_NODELAY, &v)); NUTS_TRUE(v); @@ -178,17 +174,6 @@ test_tcp_no_delay_option(void) NUTS_PASS(nng_dialer_close(d)); NUTS_PASS(nng_listener_close(l)); - // Make sure socket wide defaults apply. -#ifndef NNG_ELIDE_DEPRECATED - NUTS_PASS(nng_socket_set_bool(s, NNG_OPT_TCP_NODELAY, true)); - v = false; - NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_TCP_NODELAY, &v)); - NUTS_TRUE(v); - NUTS_PASS(nng_socket_set_bool(s, NNG_OPT_TCP_NODELAY, false)); - NUTS_PASS(nng_dialer_create(&d, s, addr)); - NUTS_PASS(nng_dialer_get_bool(d, NNG_OPT_TCP_NODELAY, &v)); - NUTS_TRUE(v == false); -#endif NUTS_CLOSE(s); } @@ -204,10 +189,6 @@ test_tcp_keep_alive_option(void) NUTS_ADDR(addr, "tcp"); NUTS_OPEN(s); -#ifndef NNG_ELIDE_DEPRECATED - NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_TCP_KEEPALIVE, &v)); - NUTS_TRUE(v == false); -#endif NUTS_PASS(nng_dialer_create(&d, s, addr)); NUTS_PASS(nng_dialer_get_bool(d, NNG_OPT_TCP_KEEPALIVE, &v)); NUTS_TRUE(v == false); @@ -230,17 +211,6 @@ test_tcp_keep_alive_option(void) NUTS_PASS(nng_dialer_close(d)); NUTS_PASS(nng_listener_close(l)); - // Make sure socket wide defaults apply. -#ifndef NNG_ELIDE_DEPRECATED - NUTS_PASS(nng_socket_set_bool(s, NNG_OPT_TCP_KEEPALIVE, false)); - v = true; - NUTS_PASS(nng_socket_get_bool(s, NNG_OPT_TCP_KEEPALIVE, &v)); - NUTS_TRUE(v == false); - NUTS_PASS(nng_socket_set_bool(s, NNG_OPT_TCP_KEEPALIVE, true)); - NUTS_PASS(nng_dialer_create(&d, s, addr)); - NUTS_PASS(nng_dialer_get_bool(d, NNG_OPT_TCP_KEEPALIVE, &v)); - NUTS_TRUE(v); -#endif NUTS_CLOSE(s); } |
