[Mochi-devel] Serializing raw buffers in mercury

Philip Davis philip.e.davis at rutgers.edu
Thu Feb 6 10:12:25 CST 2020


Hello,

I have a need to serialize a simple raw buffer (void * and length.) I’m looking at the “serializing complex data structures” page on the Margo documentation, and I want to make sure I’m doing this right. Should I be writing an hg_proc_* function that serializes the hg_size_t and uses hg_proc_raw to copy the buffer, or is there some existing hg_proc_* function I can leverage to encode/decode the buffer/length pair in a single call? It doesn’t look to me like hg_proc_raw can do this, since the length is copied by value.

Thanks,
Philip


More information about the mochi-devel mailing list