-
Notifications
You must be signed in to change notification settings - Fork 903
v1_1_c_overview
Takatoshi Kondo edited this page Oct 14, 2015
·
18 revisions
Include msgpack.hpp header file.
#include <msgpack.hpp>
Link msgpack library.
When you use UNIX, the library name is libmsgpack.a
. When you use Windows, the library name is msgpack.lib
for static link and msgpack_import.lib
for dynamic link.
When you pack your data, use buffers and a packer.
msgpack_sbuffer sbuf; /* buffer */
msgpack_packer pk; /* packer */
msgpack_sbuffer_init(&sbuf); /* initialize buffer */
msgpack_packer_init(&pk, &sbuf, msgpack_sbuffer_write); /* initialize packer */
The buffers store packed byte data. msgpack-c provides four buffers. sbuffer
, fbuffer
, zbuffer
, and vrefbuffer
.
-
Home
- Q&A
- v2.0.x or later
- v1.1.x - v1.4.x
- v1.0.x