aboutsummaryrefslogtreecommitdiff
path: root/src/core/message.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-08-31 11:25:50 -0700
committerGarrett D'Amore <garrett@damore.org>2018-08-31 11:25:50 -0700
commit49c8c264057c4c7b0f9ff45f352168cb1deeb1a1 (patch)
tree30836d3dfe020380216113784b4ab74c633d9b45 /src/core/message.h
parent2426984f20a8363e52fef5cd69221da05c0b1756 (diff)
downloadnng-49c8c264057c4c7b0f9ff45f352168cb1deeb1a1.tar.gz
nng-49c8c264057c4c7b0f9ff45f352168cb1deeb1a1.tar.bz2
nng-49c8c264057c4c7b0f9ff45f352168cb1deeb1a1.zip
fixes #691 Desire 16 and 64 bit message manipulators
We use macros to generate message bodies for each of the various variants, reducing source code size (but not compiled size). The documentation is updated to indicate each of these variants.
Diffstat (limited to 'src/core/message.h')
-rw-r--r--src/core/message.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/message.h b/src/core/message.h
index 00d31436..5ec1d9a1 100644
--- a/src/core/message.h
+++ b/src/core/message.h
@@ -35,14 +35,30 @@ extern int nni_msg_header_chop(nni_msg *, size_t);
extern int nni_msg_setopt(nni_msg *, int, const void *, size_t);
extern int nni_msg_getopt(nni_msg *, int, void *, size_t *);
extern void nni_msg_dump(const char *, const nni_msg *);
+extern int nni_msg_append_u16(nni_msg *, uint16_t);
extern int nni_msg_append_u32(nni_msg *, uint32_t);
+extern int nni_msg_append_u64(nni_msg *, uint64_t);
+extern int nni_msg_insert_u16(nni_msg *, uint16_t);
extern int nni_msg_insert_u32(nni_msg *, uint32_t);
+extern int nni_msg_insert_u64(nni_msg *, uint64_t);
+extern int nni_msg_header_append_u16(nni_msg *, uint16_t);
extern int nni_msg_header_append_u32(nni_msg *, uint32_t);
+extern int nni_msg_header_append_u64(nni_msg *, uint64_t);
+extern int nni_msg_header_insert_u16(nni_msg *, uint16_t);
extern int nni_msg_header_insert_u32(nni_msg *, uint32_t);
+extern int nni_msg_header_insert_u64(nni_msg *, uint64_t);
+extern uint16_t nni_msg_trim_u16(nni_msg *);
extern uint32_t nni_msg_trim_u32(nni_msg *);
+extern uint64_t nni_msg_trim_u64(nni_msg *);
+extern uint16_t nni_msg_chop_u16(nni_msg *);
extern uint32_t nni_msg_chop_u32(nni_msg *);
+extern uint64_t nni_msg_chop_u64(nni_msg *);
+extern uint16_t nni_msg_header_trim_u16(nni_msg *);
extern uint32_t nni_msg_header_trim_u32(nni_msg *);
+extern uint64_t nni_msg_header_trim_u64(nni_msg *);
+extern uint16_t nni_msg_header_chop_u16(nni_msg *);
extern uint32_t nni_msg_header_chop_u32(nni_msg *);
+extern uint64_t nni_msg_header_chop_u64(nni_msg *);
extern void nni_msg_set_pipe(nni_msg *, uint32_t);
extern uint32_t nni_msg_get_pipe(const nni_msg *);