aboutsummaryrefslogtreecommitdiff
path: root/tests/survey.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-10 18:14:27 -0700
committerGarrett D'Amore <garrett@damore.org>2017-08-10 22:47:43 -0700
commitdbbee1a3ea7fbd26c528eb96ebe0dbfd7075e292 (patch)
treec5b94f14fd95725077d2b4e9cd0d3d4d166aa7e2 /tests/survey.c
parent34ceda3c2dd4990d15e0341e86861dd291003f63 (diff)
downloadnng-dbbee1a3ea7fbd26c528eb96ebe0dbfd7075e292.tar.gz
nng-dbbee1a3ea7fbd26c528eb96ebe0dbfd7075e292.tar.bz2
nng-dbbee1a3ea7fbd26c528eb96ebe0dbfd7075e292.zip
Unify the msg API.
This makes the operations that work on headers start with nni_msg_header or nng_msg_header. It also renames _trunc to _chop (same strlen as _trim), and renames prepend to insert. We add a shorthand for clearing message content, and make better use of the endian safe 32-bit accessors too. This also fixes a bug in inserting large headers into messages. A test suite for message handling is included.
Diffstat (limited to 'tests/survey.c')
-rw-r--r--tests/survey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/survey.c b/tests/survey.c
index 6f85850f..2a757a98 100644
--- a/tests/survey.c
+++ b/tests/survey.c
@@ -123,7 +123,7 @@ Main({
msg = NULL;
So(nng_recvmsg(resp, &msg, 0) == 0);
CHECKSTR(msg, "abc");
- nng_msg_trunc(msg, 3);
+ nng_msg_chop(msg, 3);
APPENDSTR(msg, "def");
So(nng_sendmsg(resp, msg, 0) == 0);
msg = NULL;