Skip to content

Commit

Permalink
Remove deprecated nng_pipe_getopt and friends.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Sep 7, 2024
1 parent 619e066 commit 7b72efa
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 237 deletions.
1 change: 0 additions & 1 deletion docs/man/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ if (NNG_ENABLE_DOC)
nng_pipe_close
nng_pipe_dialer
nng_pipe_get
nng_pipe_getopt
nng_pipe_id
nng_pipe_listener
nng_pipe_notify
Expand Down
1 change: 0 additions & 1 deletion docs/man/libnng.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ Listeners accept incoming connection requests, and dialers make them.
|xref:nng_pipe_close.3.adoc[nng_pipe_close()]|close pipe
|xref:nng_pipe_dialer.3.adoc[nng_pipe_dialer()]|return dialer that created pipe
|xref:nng_pipe_get.3.adoc[nng_pipe_get()]|get pipe option
|xref:nng_pipe_getopt.3.adoc[nng_pipe_getopt()]|get pipe option
|xref:nng_pipe_id.3.adoc[nng_pipe_id()]|get numeric pipe identifier
|xref:nng_pipe_listener.3.adoc[nng_pipe_listener()]|return listener that created pipe
|xref:nng_pipe_notify.3.adoc[nng_pipe_notify()]|register pipe notification callback
Expand Down
1 change: 0 additions & 1 deletion docs/man/nng_getopt.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ These functions return 0 on success, and non-zero otherwise.
[.text-left]
xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt(3)],
xref:nng_listener_getopt.3.adoc[nng_listener_getopt(3)],
xref:nng_pipe_getopt.3.adoc[nng_pipe_getopt(3)],
xref:nng_setopt.3.adoc[nng_setopt(3)],
xref:nng_strdup.3.adoc[nng_strdup(3)],
xref:nng_strerror.3.adoc[nng_strerror(3)],
Expand Down
4 changes: 2 additions & 2 deletions docs/man/nng_msg_get_pipe.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The most usual use case for this is to obtain information about the peer
from which the message was received.
This can be used to provide different behaviors for different peers, such as
a higher level of authentication for peers located on an untrusted network.
The xref:nng_pipe_getopt.3.adoc[`nng_pipe_getopt()`] function
The xref:nng_pipe_get.3.adoc[`nng_pipe_get()`] function
is useful in this situation.


Expand All @@ -56,5 +56,5 @@ None.
[.text-left]
xref:nng_msg_alloc.3.adoc[nng_msg_alloc(3)],
xref:nng_msg_set_pipe.3.adoc[nng_msg_set_pipe(3)],
xref:nng_pipe_getopt.3.adoc[nng_pipe_getopt(3)],
xref:nng_pipe_get.3.adoc[nng_pipe_get(3)],
xref:nng.7.adoc[nng(7)]
2 changes: 1 addition & 1 deletion docs/man/nng_msg_set_pipe.3.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ None.
[.text-left]
xref:nng_msg_alloc.3.adoc[nng_msg_alloc(3)],
xref:nng_msg_get_pipe.3.adoc[nng_msg_get_pipe(3)],
xref:nng_pipe_getopt.3.adoc[nng_pipe_getopt(3)],
xref:nng_pipe_get.3.adoc[nng_pipe_get(3)],
xref:nng_msg.5.adoc[nng_msg(5)],
xref:nng.7.adoc[nng(7)]
2 changes: 1 addition & 1 deletion docs/man/nng_pipe.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ nng_pipe p = NNG_PIPE_INITIALIZER;
[.text-left]
xref:nng_msg_get_pipe.3.adoc[nng_msg_get_pipe(3)],
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_dialer.3.adoc[nng_pipe_dialer(3)],
xref:nng_pipe_id.3.adoc[nng_pipe_id(3)],
xref:nng_pipe_listener.3.adoc[nng_pipe_listener(3)],
Expand Down
155 changes: 0 additions & 155 deletions docs/man/nng_pipe_getopt.3.adoc

This file was deleted.

5 changes: 5 additions & 0 deletions docs/migrating/nng1.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ The `NNG_OPT_WSS_REQUEST_HEADERS` and `NNG_OPT_WSS_RESPONSE_HEADERS` aliases for
`NNG_OPT_WS_OPT_WS_REQUEST_HEADERS` and `NNG_OPT_WS_RESPONSE_HEADERS` have been removed.
Just convert any use of them to `NNG_OPT_WS_REQUST_HEADERS` or
`NNG_OPT_WS_RESPOSNE_HEADERS` as appropriate.

## Option Functions

The previously deprecated `nng_pipe_getopt_xxx` family of functions is removed.
Applications should use `nng_pipe_get` and related functions instead.
19 changes: 0 additions & 19 deletions include/nng/nng.h
Original file line number Diff line number Diff line change
Expand Up @@ -1420,25 +1420,6 @@ NNG_DECL int nng_listener_setopt_ptr(
NNG_DECL int nng_listener_setopt_string(
nng_listener, const char *, const char *) NNG_DEPRECATED;

// Pipe options. Use nng_pipe_get instead.
NNG_DECL int nng_pipe_getopt(
nng_pipe, const char *, void *, size_t *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_bool(
nng_pipe, const char *, bool *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_int(nng_pipe, const char *, int *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_ms(
nng_pipe, const char *, nng_duration *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_size(
nng_pipe, const char *, size_t *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_sockaddr(
nng_pipe, const char *, nng_sockaddr *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_uint64(
nng_pipe, const char *, uint64_t *) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_ptr(
nng_pipe, const char *, void **) NNG_DEPRECATED;
NNG_DECL int nng_pipe_getopt_string(
nng_pipe, const char *, char **) NNG_DEPRECATED;

#endif // NNG_ELIDE_DEPRECATED

// nng_init_parameter is used by applications to change a tunable setting.
Expand Down
56 changes: 0 additions & 56 deletions src/nng_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,60 +394,4 @@ nng_listener_setopt_string(nng_listener id, const char *n, const char *v)
return (nng_listener_set_string(id, n, v));
}

// Pipes

int
nng_pipe_getopt(nng_pipe id, const char *n, void *v, size_t *sz)
{
return (nng_pipe_get(id, n, v, sz));
}

int
nng_pipe_getopt_int(nng_pipe id, const char *n, int *v)
{
return (nng_pipe_get_int(id, n, v));
}

int
nng_pipe_getopt_bool(nng_pipe id, const char *n, bool *v)
{
return (nng_pipe_get_bool(id, n, v));
}

int
nng_pipe_getopt_size(nng_pipe id, const char *n, size_t *v)
{
return (nng_pipe_get_size(id, n, v));
}

int
nng_pipe_getopt_uint64(nng_pipe id, const char *n, uint64_t *v)
{
return (nng_pipe_get_uint64(id, n, v));
}

int
nng_pipe_getopt_string(nng_pipe id, const char *n, char **v)
{
return (nng_pipe_get_string(id, n, v));
}

int
nng_pipe_getopt_ptr(nng_pipe id, const char *n, void **v)
{
return (nng_pipe_get_ptr(id, n, v));
}

int
nng_pipe_getopt_ms(nng_pipe id, const char *n, nng_duration *v)
{
return (nng_pipe_get_ms(id, n, v));
}

int
nng_pipe_getopt_sockaddr(nng_pipe id, const char *n, nng_sockaddr *v)
{
return (nng_pipe_get_addr(id, n, v));
}

#endif // NNG_ELIDE_DEPRECATED

0 comments on commit 7b72efa

Please sign in to comment.