aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index a3dafb7a..664da2d5 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -387,19 +387,12 @@ NNG_DECL const char *nng_strerror(int);
// this function may (will!) return before any receiver has actually
// received the data. The return value will be zero to indicate that the
// socket has accepted the entire data for send, or an errno to indicate
-// failure. The flags may include NNG_FLAG_NONBLOCK or NNG_FLAG_ALLOC.
-// If the flag includes NNG_FLAG_ALLOC, then the function will call
-// nng_free() on the supplied pointer & size on success. (If the call
-// fails then the memory is not freed.)
+// failure. The flags may include NNG_FLAG_NONBLOCK.
NNG_DECL int nng_send(nng_socket, void *, size_t, int);
// nng_recv receives message data into the socket, up to the supplied size.
// The actual size of the message data will be written to the value pointed
-// to by size. The flags may include NNG_FLAG_NONBLOCK and NNG_FLAG_ALLOC.
-// If NNG_FLAG_ALLOC is supplied then the library will allocate memory for
-// the caller. In that case the pointer to the allocated will be stored
-// instead of the data itself. The caller is responsible for freeing the
-// associated memory with nng_free().
+// to by size. The flags may include NNG_FLAG_NONBLOCK.
NNG_DECL int nng_recv(nng_socket, void *, size_t *, int);
// nng_sendmsg is like nng_send, but offers up a message structure, which
@@ -488,10 +481,9 @@ NNG_DECL int nng_ctx_set_ms(nng_ctx, const char *, nng_duration);
// specific API.
NNG_DECL void *nng_alloc(size_t);
-// nng_free is used to free memory allocated with nng_alloc, which includes
-// memory allocated by nng_recv() when the NNG_FLAG_ALLOC message is supplied.
-// As the application is required to keep track of the size of memory, this
-// is probably less convenient for general uses than the C library malloc and
+// nng_free is used to free memory allocated with nng_alloc. As the
+// application is required to keep track of the size of memory, this is
+// probably less convenient for general uses than the C library malloc and
// calloc.
NNG_DECL void nng_free(void *, size_t);
@@ -711,7 +703,6 @@ NNG_DECL nng_dialer nng_pipe_dialer(nng_pipe);
NNG_DECL nng_listener nng_pipe_listener(nng_pipe);
// Flags.
-#define NNG_FLAG_ALLOC 1u // Recv to allocate receive buffer
#define NNG_FLAG_NONBLOCK 2u // Non-blocking operations
// Options.