On Wed, 2017-08-30 at 11:15 +0200, Stephan Opfer wrote:
> Hi all,
> 
> after the second sending over a RADIO socket, the send method always
> returns resource temporarily unavailable. Nevertheless the sockets is
> sending something every call. Here are the few lines of code I use:
> 
> this->ctx = zmq_ctx_new();
> this->socket = zmq_socket(ctx, ZMQ_RADIO);
> zmq_connect(socket, "udp://224.0.0.1:5555")
> zmq_msg_t msg;
> zmq_msg_init_data(&msg, byteArray.begin(), byteArray.size(), NULL,
> NULL);
> zmq_msg_set_group(&msg, "TestMCGroup");
> zmq_msg_send(&msg, this->socket, 0); // <-- return code is 11 -
> Resource temporarily unavailable
> zmq_msg_close(&msg);
> 
> I am sending in a while(true) loop. Is that too fast? Do I actually
> have problem at all?
> 
> Greetings,
>    Stephan

11 is the number of bytes sent, from the manpage:

The zmq_msg_send() function shall return number of bytes in the message
       if successful. Otherwise it shall return -1 and set errno to one
of the
       values defined below.

Also as the manpage says you should not close the message in case of
success, only in case of error (ie: -1 was returned)

-- 
Kind regards,
Luca Boccassi

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to