[zeromq-dev] How to create an efficient ZMQ message receiver in C#?

mark manwoodvice at googlemail.com
Tue Apr 8 22:42:05 CEST 2014


Most trivial ZMQ examples use a spinning loop to receive messages, like so:

*while (true)*
*{*
*   // Wait for next request from client*
*   string message = server.Receive(Encoding.Unicode);*
*   //.....*
*}*

Which obviously ties up a thread.

Is there a better way (preferably in C#) to wait for incoming messages?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140408/3a197ee6/attachment.htm>


More information about the zeromq-dev mailing list