aboutsummaryrefslogtreecommitdiff
path: root/src/core/message.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-06 08:18:50 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-06 08:21:09 -0800
commita2801adffebb6a3679e41789b38ba925ed32832b (patch)
tree8e3a743301fedb04d19d9af3e30f5622b737c337 /src/core/message.h
parent601d7a6ca95678613ca576258314f50a6e5e742c (diff)
downloadnng-a2801adffebb6a3679e41789b38ba925ed32832b.tar.gz
nng-a2801adffebb6a3679e41789b38ba925ed32832b.tar.bz2
nng-a2801adffebb6a3679e41789b38ba925ed32832b.zip
Message API was awkward.
The use of a single function to get both size and length actually turned out to be awkward to use; better to have separate functions to get each. While here, disable some of the initialization/fork checks, because it turns out they aren't needed.
Diffstat (limited to 'src/core/message.h')
-rw-r--r--src/core/message.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/message.h b/src/core/message.h
index 0f9a24ac..057c7539 100644
--- a/src/core/message.h
+++ b/src/core/message.h
@@ -16,8 +16,10 @@ extern int nni_msg_alloc(nni_msg **, size_t);
extern void nni_msg_free(nni_msg *);
extern int nni_msg_realloc(nni_msg *, size_t);
extern int nni_msg_dup(nni_msg **, const nni_msg *);
-extern void *nni_msg_header(nni_msg *, size_t *);
-extern void *nni_msg_body(nni_msg *, size_t *);
+extern void *nni_msg_header(nni_msg *);
+extern size_t nni_msg_header_len(nni_msg *);
+extern void *nni_msg_body(nni_msg *);
+extern size_t nni_msg_len(nni_msg *);
extern int nni_msg_append(nni_msg *, const void *, size_t);
extern int nni_msg_prepend(nni_msg *, const void *, size_t);
extern int nni_msg_append_header(nni_msg *, const void *, size_t);