>From my point of view, it would be better.

And, now that I think of it, can I poll signal fd and timer fd with
zmq::poll (I'm thinking of ACE-like reactor pattern)?

On Tue, 01 Mar 2011 18:06:08 +0100
Martin Sustrik <[email protected]> wrote:

> On 03/01/2011 06:12 PM, Skrzyniarz Alexandre wrote:
> 
> > By the way, the zmq_cpp man page says:
> >
> >         The poll() function is a namespaced equivalent of the
> > zmq_poll() function, as described in zmq_poll(3).
> >
> >             Note
> >             To obtain a 0MQ socket for use in a zmq_pollitem_t
> >             structure, you should cast an instance of the socket_t
> > class to (void *).
> 
> You've cast pointer to socket_t to void* instead of socket_t to void*.
> 
> But right, it's messy and prone to error.
> 
> Probably the best solution would be to extract the handle explicitly:
> 
> item.socket = sock.handle ();
> 
> Thoughts?
> Martin



-- 
Alexandre SKRZYNIARZ, PhD.
[EXPERTS] Domain Design Authority, Radar & Warfare Systems.
THALES AIRBORNE SYSTEMS
10 Av 1ere DFL, 29200 BREST, France
email: [email protected]


-- 
Alexandre SKRZYNIARZ, PhD.
[EXPERTS] Domain Design Authority, Radar & Warfare Systems.
THALES AIRBORNE SYSTEMS
10 Av 1ere DFL, 29200 BREST, France
email: [email protected]
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to