summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-03 08:59:47 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-03 09:23:47 -0800
commit8c529c4143ce06b4c72fca1aa593e32e62fdbe18 (patch)
treef7c3f4330c354e3a03d5b6cf2443f3289ff00289 /include
parent7643626bcf38aee7cb9f44d518401047d1c34c76 (diff)
downloadnng-8c529c4143ce06b4c72fca1aa593e32e62fdbe18.tar.gz
nng-8c529c4143ce06b4c72fca1aa593e32e62fdbe18.tar.bz2
nng-8c529c4143ce06b4c72fca1aa593e32e62fdbe18.zip
stable: add nng_socket_close to aid transition to 2.0
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index b496b343..6db41a85 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -223,8 +223,14 @@ NNG_DECL void nng_fini(void);
// nng_close closes the socket, terminating all activity and
// closing any underlying connections and releasing any associated
// resources.
+// We're not eliding this with NNG_ELIDE_DEPRECATED for now, because
+// it would break far too many applications, as nng_socket_close is brand new.
NNG_DECL int nng_close(nng_socket);
+// nng_socket_close is the *new* name for nng_close. It should be used
+// in new code, as nng_close will be removed in the next major release.
+NNG_DECL int nng_socket_close(nng_socket);
+
// nng_socket_id returns the positive socket id for the socket, or -1
// if the socket is not valid.
NNG_DECL int nng_socket_id(nng_socket);