[zeromq-dev] discussion on the Lasy Pirate Client : lpclient.c
Pieter Hintjens
ph at imatix.com
Thu Jun 6 15:19:36 CEST 2013
On Thu, Jun 6, 2013 at 3:05 PM, Laurent Alebarde <l.alebarde at free.fr> wrote:
> I wonder what could be a use case of a polling with ZMQ_POLLOUT
When you want to be sure you won't block on sending, e.g. on a DEALER
or PUSH socket where you have quite strict HWM constraints.
However I've never found a use-case where that made sense given that
it's far easier to store the message in the socket's queues than in
your application.
> If I create a ZMQ_REQ socket, can I say that (items [0].revents &
> ZMQ_POLLIN) is equivallent to (rc >= 1) in all cases ? It may looks like
> counting how many angels can dance on the head of a pin (couper les cheveux
> en quatre).
If you polled on input then yes.
> In your point 5, "you have to then destroy and recreate the socket.", is
> actually to not affect the send/receive constraint when we want to resend
> without having received a reply ?
The socket gets into a state where it rejects further requests. We
might fix this one day. For now, I just destroy it and start with a
new socket.
-Pieter
More information about the zeromq-dev
mailing list