Skip to content

Commit

Permalink
Remove the last of the legacy option handling functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Oct 6, 2024
1 parent e677cf5 commit 0a8b26c
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 415 deletions.
3 changes: 1 addition & 2 deletions docs/man/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ if (NNG_ENABLE_DOC)
nng_dialer_set
nng_dialer_start
nng_free
nng_getopt
nng_listen
nng_listener_close
nng_listener_create
Expand Down Expand Up @@ -152,7 +151,7 @@ if (NNG_ENABLE_DOC)
nng_send
nng_send_aio
nng_sendmsg
nng_setopt
nng_set
nng_sleep_aio
nng_socket_id
nng_socket_get
Expand Down
3 changes: 1 addition & 2 deletions docs/man/libnng.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ The following functions operate on sockets.
|===
|xref:nng_close.3.adoc[nng_close()]|close socket
|xref:nng_dial.3.adoc[nng_dial()]|create and start dialer
|xref:nng_getopt.3.adoc[nng_getopt()]|get socket option
|xref:nng_get.3.adoc[nng_get()]|get socket option
|xref:nng_listen.3.adoc[nng_listen()]|create and start listener
|xref:nng_recv.3.adoc[nng_recv()]|receive data
|xref:nng_send.3.adoc[nng_send()]|send data
|xref:nng_setopt.3.adoc[nng_setopt()]|set socket option
|xref:nng_socket_get.3.adoc[nng_socket_get()]|get socket option
|xref:nng_socket_id.3.adoc[nng_socket_id()]|get numeric socket identifier
|xref:nng_socket_set.3.adoc[nng_socket_set()]|set socket option
Expand Down
142 changes: 0 additions & 142 deletions docs/man/nng_getopt.3.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/man/nng_pipe_notify.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This function returns 0 on success, and non-zero otherwise.

[.text-left]
xref:nng_pipe_close.3.adoc[nng_pipe_close(3)],
xref:nng_pipe_getopt.3.adoc[nng_pipe_getopt(3)],
xref:nng_pipe_get.3.adoc[nng_pipe_get(3)],
xref:nng_pipe.5.adoc[nng_pipe(5)],
xref:nng_socket.5.adoc[nng_socket(5)],
xref:nng.7.adoc[nng(7)]
125 changes: 0 additions & 125 deletions docs/man/nng_setopt.3.adoc

This file was deleted.

4 changes: 2 additions & 2 deletions docs/man/nng_socket.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ nng_socket s = NNG_SOCKET_INITIALIZER;
[.text-left]
xref:libnng.3.adoc[libnng(3)],
xref:nng_close.3.adoc[nng_close(3)],
xref:nng_getopt.3.adoc[nng_getopt(3)],
xref:nng_setopt.3.adoc[nng_setopt(3)],
xref:nng_socket_get.3.adoc[nng_socket_get(3)],
xref:nng_socket_id.3.adoc[nng_socket_id(3)],
xref:nng_socket_set.3.adoc[nng_socket_set(3)],
xref:nng_dialer.5.adoc[nng_dialer(5)],
xref:nng_listener.5.adoc[nng_listener(5)],
xref:nng_options.5.adoc[nng_options(5)],
Expand Down
4 changes: 2 additions & 2 deletions docs/man/nng_sub.7.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ The following protocol-specific options are available.
discarded.
+
NOTE: This option is a byte array. Thus if you use
xref:nng_setopt.3.adoc[`nng_setopt_string()`] the `NUL` terminator byte will
xref:nng_socket_set.3.adoc[`nng_socket_set_string()`] the `NUL` terminator byte will
be included in the topic.
If that isn't desired, consider using
xref:nng_setopt.3.adoc[`nng_setopt()`] and using `strlen()` of the topic
xref:nng_socket_set.3.adoc[`nng_socket_set()`] and using `strlen()` of the topic
as the topic size.
+
TIP: To receive all messages, an empty topic (zero length) can be used.
Expand Down
6 changes: 0 additions & 6 deletions docs/man/nng_tcp_options.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,5 @@ when appropriate for the context:
== SEE ALSO

[.text-left]
xref:nng_tcp_dialer_getopt.3tcp.adoc[nng_tcp_dialer_getopt(3tcp)],
xref:nng_tcp_dialer_setopt.3tcp.adoc[nng_tcp_dialer_setopt(3tcp)],
xref:nng_tcp_getopt.3tcp.adoc[nng_tcp_getopt(3tcp)],
xref:nng_tcp_listener_getopt.3tcp.adoc[nng_tcp_listener_getopt(3tcp)],
xref:nng_tcp_listener_setopt.3tcp.adoc[nng_tcp_listener_setopt(3tcp)],
xref:nng_tcp_setopt.3tcp.adoc[nng_tcp_setopt(3tcp)],
xref:nng_options.5.adoc[nng_options(5)]
xref:nng.7.adoc[nng(7)]
33 changes: 0 additions & 33 deletions include/nng/nng.h
Original file line number Diff line number Diff line change
Expand Up @@ -1296,39 +1296,6 @@ NNG_DECL void nng_udp_recv(nng_udp *udp, nng_aio *aio);
NNG_DECL int nng_udp_multicast_membership(
nng_udp *udp, nng_sockaddr *sa, bool join);

#ifndef NNG_ELIDE_DEPRECATED
// These are legacy APIs that have been deprecated.
// Their use is strongly discouraged.

// Socket options. Use nng_socket_get and nng_socket_set instead.
NNG_DECL int nng_getopt(
nng_socket, const char *, void *, size_t *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_bool(nng_socket, const char *, bool *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_int(nng_socket, const char *, int *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_ms(
nng_socket, const char *, nng_duration *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_size(
nng_socket, const char *, size_t *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_uint64(
nng_socket, const char *, uint64_t *) NNG_DEPRECATED;
NNG_DECL int nng_getopt_ptr(nng_socket, const char *, void **) NNG_DEPRECATED;
NNG_DECL int nng_getopt_string(
nng_socket, const char *, char **) NNG_DEPRECATED;
NNG_DECL int nng_setopt(
nng_socket, const char *, const void *, size_t) NNG_DEPRECATED;
NNG_DECL int nng_setopt_bool(nng_socket, const char *, bool) NNG_DEPRECATED;
NNG_DECL int nng_setopt_int(nng_socket, const char *, int) NNG_DEPRECATED;
NNG_DECL int nng_setopt_ms(
nng_socket, const char *, nng_duration) NNG_DEPRECATED;
NNG_DECL int nng_setopt_size(nng_socket, const char *, size_t) NNG_DEPRECATED;
NNG_DECL int nng_setopt_uint64(
nng_socket, const char *, uint64_t) NNG_DEPRECATED;
NNG_DECL int nng_setopt_string(
nng_socket, const char *, const char *) NNG_DEPRECATED;
NNG_DECL int nng_setopt_ptr(nng_socket, const char *, void *) NNG_DEPRECATED;

#endif // NNG_ELIDE_DEPRECATED

// nng_init_parameter is used by applications to change a tunable setting.
// This function must be called before any other NNG function for the setting
// to have any effect. This function is also not thread-safe!
Expand Down
Loading

0 comments on commit 0a8b26c

Please sign in to comment.