aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/migrate/nng1.md
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-01-03 12:46:33 -0800
committerGarrett D'Amore <garrett@damore.org>2025-01-04 09:48:44 -0800
commit57e736b5be2052484eec44889586bd89a2724c71 (patch)
treef579d2863d7d31e202f083ab6d5f5fe85651e64c /docs/ref/migrate/nng1.md
parentcefc6e1995f7f8e53e16db745eac7a86c2ebffd3 (diff)
downloadnng-57e736b5be2052484eec44889586bd89a2724c71.tar.gz
nng-57e736b5be2052484eec44889586bd89a2724c71.tar.bz2
nng-57e736b5be2052484eec44889586bd89a2724c71.zip
api: rename nng_send_aio and nng_recv_aio to nng_socket_send and nng_socket_recv
This aligns more closely with the nng_ctx functions.
Diffstat (limited to 'docs/ref/migrate/nng1.md')
-rw-r--r--docs/ref/migrate/nng1.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index 8306e71f..74350ec0 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -15,9 +15,14 @@ This is done using the [`nng_init`] function.
## Renamed Functions
-The `nng_close` function has been renamed to [`nng_socket_close`] to make it clearer that
-the object being closed is a socket. A compatible `nng_close` macro is available by defining `NNG1_TRANSITION`
-in your compilation environment.
+The following functions have been renamed as described by the following table.
+The old names are available by defining the macro `NNG1_TRANSITION` in your compilation environment.
+
+| Old Name | New Name |
+| -------------- | -------------------- |
+| `nng_close` | [`nng_socket_close`] |
+| `nng_recv_aio` | [`nng_socket_recv`] |
+| `nng_send_aio` | [`nng_socket_send`] |
## Removed Protocol Aliases
@@ -46,7 +51,7 @@ The `NNG_FLAG_ALLOC` flag that allowed a zero copy semantic with [`nng_send`] an
This was implemented mostly to aid legacy nanomsg applications, and it was both error prone and still a bit
suboptimal in terms of performance.
-Modern code should use one of [`nng_sendmsg`], [`nng_recvmsg`], [`nng_send_aio`], or [`nng_recv_aio`] to get the maximum performance benefit.
+Modern code should use one of [`nng_sendmsg`], [`nng_recvmsg`], [`nng_socket_send`], or [`nng_socket_recv`] to get the maximum performance benefit.
Working directly with [`nng_msg`] structures gives more control, reduces copies, and reduces allocation activity.
## New AIO Error Code NNG_ESTOPPED