From 57e736b5be2052484eec44889586bd89a2724c71 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 3 Jan 2025 12:46:33 -0800 Subject: 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. --- docs/ref/migrate/nng1.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'docs/ref/migrate') 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 -- cgit v1.2.3-70-g09d2