IoTHub raw messaging client sample using AMQP
Dependencies: iothub_client EthernetInterface NTPClient iothub_amqp_transport azure_c_shared_utility mbed-rtos mbed azure_uamqp_c wolfSSL
This sample showcases the usage of Azure IoT client libraries with the AMQP transport for sending/receiving raw messages from an IoT Hub.
Diff: iothub_client_sample_amqp.c
- Revision:
- 19:de28463ff3cc
- Parent:
- 17:d01a2794d5d7
- Child:
- 20:ef0d1001c8f0
--- a/iothub_client_sample_amqp.c Fri Oct 23 01:44:17 2015 +0000 +++ b/iothub_client_sample_amqp.c Mon Nov 02 19:21:30 2015 -0800 @@ -30,6 +30,7 @@ int* counter = (int*)userContextCallback; const char* buffer; size_t size; + if (IoTHubMessage_GetByteArray(message, (const unsigned char**)&buffer, &size) == IOTHUB_MESSAGE_OK) { (void)printf("Received Message [%d] with Data: <<<%.*s>>> & Size=%d\r\n", *counter, (int)size, buffer, (int)size);