summaryrefslogtreecommitdiff
path: root/doc/documentation/tutorial-examples/005.c
blob: 1b59f85a6bef1dafbd4ee88e3cfcc3a7211a3561 (plain)
1
2
3
4
5
6
7
8
9
struct GNUNET_MQ_Envelope *env;
struct GNUNET_MessageHeader *msg;

env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE);
GNUNET_memcpy (&msg[1],
               &payload,
               payload_size);
// Send message via message queue 'mq'
GNUNET_mq_send (mq, env);