[zeromq-dev] zmq_poll not working on Windows

Marko.Dieckmann at gmx.de Marko.Dieckmann at gmx.de
Wed Oct 5 12:58:29 CEST 2011


Hi Martin,

 I think it's ok. I'm using the cpp wrapper, so naturally I should have used the void* returned by zmq_socket instead of the pointer of the zmq::socket_t object.
 To make it more sane for users of the cpp wrapper, we could add a function like this to the cpp wrapper:

 inline void InitPollItem(zmq_pollitem_t& item, zmq::socket_t* pSocket, short sEvents, int iFD = 0, short sREvents = 0)
 {
 if (pSocket)
 item.socket = *pSocket;
 else
 item.socket = NULL;
 item.fd = iFD;
 item.events = sEvents;
 item.revents = sREvents;
 }


 Cheers,
 Marko




----- Ursprüngliche Nachricht -----
Von: Martin Sustrik
Gesendet: 04.10.11 20:05 Uhr
An: ZeroMQ development list
Betreff: Re: [zeromq-dev] zmq_poll not working on Windows

 On 10/04/2011 05:49 PM, Marko.Dieckmann at gmx.de wrote: > It's a bit confusing, though, because the struct has a void* in it. So I > thought he wants the pointer. ;) Yes. This is not the first time someone was confused. Let's fix it at least in the new version of cppzmq. Any suggestions for a more sane syntax? Martin _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111005/dcb61c37/attachment.htm>


More information about the zeromq-dev mailing list