diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-02 17:35:49 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-02 17:35:49 -0800 |
| commit | 13e380343c0eec96a723e7407d59fb7f5d20aba0 (patch) | |
| tree | f50fdea3117c64d460fc82ce7978b6b4253250cf /src/core/message.h | |
| parent | ec2b1275153487fda661942d9b98aab2567b612e (diff) | |
| download | nng-13e380343c0eec96a723e7407d59fb7f5d20aba0.tar.gz nng-13e380343c0eec96a723e7407d59fb7f5d20aba0.tar.bz2 nng-13e380343c0eec96a723e7407d59fb7f5d20aba0.zip | |
Fixes to enable REQ/REP to operate.
This uncovered a few problems - inproc was not moving the headers
to the body on transmit, and the message chunk allocator had a serious
bug leading to memory corruption. I've also added a message dumper,
which turns out to be incredibly useful during debugging.
Diffstat (limited to 'src/core/message.h')
| -rw-r--r-- | src/core/message.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/message.h b/src/core/message.h index dff71646..0f9a24ac 100644 --- a/src/core/message.h +++ b/src/core/message.h @@ -15,7 +15,7 @@ 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 **, nni_msg *); +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 int nni_msg_append(nni_msg *, const void *, size_t); @@ -28,5 +28,6 @@ extern int nni_msg_trim_header(nni_msg *, size_t); extern int nni_msg_trunc_header(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 *); #endif // CORE_SOCKET_H |
