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

Colin Ingarfield colin at ingarfield.com
Fri Jan 20 18:03:59 CET 2017


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


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
> 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/0c548c25/attachment.htm>


More information about the zeromq-dev mailing list