Hello! At the risk of revealing my atrophied C skills, I have a question about the recv.c Messenger example which contains this block of code:
size_t buffsize = 1024; char buffer[buffsize]; pn_data_t *body = pn_message_body(message); pn_data_format(body, buffer, &buffsize); I have a similar block of code in my own project (adapted from the recv example). I imagine ideally I would allocate a buffer equal to the size of the message body. However, if I attempt to determine the size of the message body by calling pn_data_size(body) immediately after pn_message_body(), I *always* get back the value of "1". Is this the correct way to determine the size of a message body, or is there an overall better approach for getting the data out of the message body? Thanks in advance for your help! - Paul
