[zeromq-dev] zmq::socket_t::send blocking

Alexandre Quessy aquessy at d-box.com
Fri Jan 20 20:00:06 CET 2017


Hi,


ALEXANDRE QUESSY
Consultant software

D-BOX Technologies Inc. | A. 2172 de la Province, Longueuil, QC J4G 1R7 CANADA | T. 450-442-3003 | W. d-box.com<http://www.d-box.com>

De : zeromq-dev [mailto:zeromq-dev-bounces at lists.zeromq.org] De la part de Colin Ingarfield
Envoyé : 20 janvier 2017 12:04
À : ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Objet : Re: [zeromq-dev] zmq::socket_t::send blocking

It depends on the type of socket and whether it has reached its HWM.  Some types of socket will block, others will drop the message, others could enqueue it and return immediately.

The behavior for each type of socket is documented here: http://api.zeromq.org/4-0:zmq-socket

Thank you for your answer!
The socket is a inproc:// ZMQ_PUSH socket.
Will that block until the message is sent, if I don’t provide the ZMQ_DONTWAIT option?
Thanks!

On 1/20/17 11:00 AM, Alexandre Quessy wrote:
Hi
zmq::socket_t::send() - Is that blocking by default?
I need it to be blocking. (wait for the data to be sent before continuing)

If I set the flag ZMQ_DONTWAIT (formerly ZMQ_NOBLOCK) it should be non-blocking. So if I don’t set it, it should block?
Thank you,

ALEXANDRE QUESSY
Consultant software

D-BOX Technologies Inc. | A. 2172 de la Province, Longueuil, QC J4G 1R7 CANADA | T. 450-442-3003 | W. d-box.com<http://www.d-box.com>

AVIS : Ce courriel contient des renseignements confidentiels. Si vous n'êtes pas le véritable destinataire, la diffusion ou l'usage de ce courriel, des renseignements qu'il contient ou des documents qui lui sont joints pourrait être illégal. Il est donc strictement interdit de les diffuser ou de les utiliser. Si vous avez reçu ce courriel par erreur, nous vous saurions gré d’en aviser l'expéditeur immédiatement et de le supprimer sans le lire, l'imprimer, le sauvegarder ou le diffuser. Nous vous remercions de votre aimable collaboration.

NOTICE: This e-mail contains confidential information. If you are not the intended recipient, any disclosure or other use of this e-mail or the information contained herein or attached hereto may be unlawful and is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and delete this e-mail without reading, printing, copying or forwarding it to anyone. Thank you for your kind cooperation.




_______________________________________________

zeromq-dev mailing list

zeromq-dev at lists.zeromq.org<mailto:zeromq-dev at lists.zeromq.org>

https://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170120/c214692d/attachment.htm>


More information about the zeromq-dev mailing list