I am using a ZMQ PUB Message Sink in my GRC application and want to send the message to my C ZMQ SUB application.
Everything works, except that I have 10 bytes to much. I.e. there is some kind of a 10 byte header (always the same sequence). At the moment I am just clipping it out, but it would be nice to know where this is coming from. Has anyone seen that before?
In C I am using
...
void *context = zmq_ctx_new();
void *socket = zmq_socket(context, ZMQ_SUB);
zmq_setsockopt(socket, ZMQ_SUBSCRIBE, "", 0);
while(1){
zmq_msg_init(&message);
if(zmq_msg_recv(&message, socket, 0)){
int size = zmq_msg_size(&message);
...
}
Size is always the following ten bytes to much
0x07 0x06 0x0A 0x00 0x00 0x00 0x00 0x3E 0x01 0x00
It seems that the third byte from the right (0x3E) is the message size.
Does anyone has a reference to the respective GnuRadio implementation/definition?