diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-04 18:08:16 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-04 18:08:16 -0800 |
| commit | 0260bd8f717a430e5327af4cce8f9431710ab233 (patch) | |
| tree | 7ffee81ec138a36c2b966b2f87aacbdcc8e74b34 /src | |
| parent | 73dbf23962570e6e211f44f77780c0e484bad18f (diff) | |
| download | nng-0260bd8f717a430e5327af4cce8f9431710ab233.tar.gz nng-0260bd8f717a430e5327af4cce8f9431710ab233.tar.bz2 nng-0260bd8f717a430e5327af4cce8f9431710ab233.zip | |
api: add nng_sock_send and nng_sock_recv
These are the 2.0 equivalent versions of nng_send_aio and nng_recv_aio.
The old names are preserved as aliases for the new. Applications can
start adopting these with this release, even before 2.0 is ready.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nng.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -219,7 +219,7 @@ nng_sendmsg(nng_socket s, nng_msg *msg, int flags) } void -nng_recv_aio(nng_socket s, nng_aio *aio) +nng_sock_recv(nng_socket s, nng_aio *aio) { nni_sock *sock; int rv; @@ -235,7 +235,13 @@ nng_recv_aio(nng_socket s, nng_aio *aio) } void -nng_send_aio(nng_socket s, nng_aio *aio) +nng_recv_aio(nng_socket s, nng_aio *aio) +{ + nng_sock_recv(s, aio); +} + +void +nng_sock_send(nng_socket s, nng_aio *aio) { nni_sock *sock; int rv; @@ -256,6 +262,12 @@ nng_send_aio(nng_socket s, nng_aio *aio) nni_sock_rele(sock); } +void +nng_send_aio(nng_socket s, nng_aio *aio) +{ + nng_sock_send(s, aio); +} + int nng_ctx_open(nng_ctx *cp, nng_socket s) { |
