[zeromq-dev] basic question - integrating zmq with a windows message pump

David.Briant at ubs.com David.Briant at ubs.com
Fri Aug 20 12:57:10 CEST 2010


thx for the heads up... I'll give that a miss for the moment as I'm
developing in python and haven't learnt how to use pyrex yet...

-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org
[mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Martin Sustrik
Sent: Fri 20-Aug-2010 11:45
To: 0MQ development list
Subject: Re: [zeromq-dev] basic question - integrating zmq with a
windows message pump

Hi David,

> Is it possible to integrate zmq into a standard MS Windows message
> pump/loop?
...
> I'd prefer to have the zmq on the same thread as the UI, i.e. doing
> something equivalent to QSAAsyncSelect. If this is possible I would
like
> to use zmq for intra-process, inter-thread communication.

In the trunk, there's no such option.

However, you can try sustrik/zeromq2, an experimental branch that 
exposes ZMQ_FD and ZMQ_EVENTS socket option.

getsockopt(ZMQ_FD) returns the file descriptor associated with the 0MQ 
socket. You can use WSAAsyncSelect on it, specifying FD_READ as lEvent.

Once the event is triggered, it means something has happened with the 
socket. At that point, do getsockopt (ZMQ_EVENTS) that'll let you know 
whether socket is ready for reasing writing or both.

Martin
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.
	
E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses.  The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission.  
If verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments.

UBS Limited is a company registered in England & Wales under company
number 2035362, whose registered office is at 1 Finsbury Avenue,
London, EC2M 2PP, United Kingdom.

UBS AG (London Branch) is registered as a branch of a foreign company
under number BR004507, whose registered office is at
1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.

UBS Clearing and Execution Services Limited is a company registered
in England & Wales under company number 03123037, whose registered
office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
 
UBS reserves the right to retain all messages. Messages are protected
and accessed only in legally justified cases.



More information about the zeromq-dev mailing list