ZeroMQ: how to achieve C-like multithreading

serdiuk

New Member
In C we have Sockets and descriptors, it is possible to just take one of these and hand them over to a Thread, this makes it possible that you can accept incoming connections and give the work to a Thread you like and the Thread can send by itself the response back. My question is, how can I achieve this with ZeroMQ? With Request-Reply pattern it seems i cannot send and receive asynchronously, the responses have to be in sequence, my goal would be to have multiple clients to a single server, sending responses not in sequence.I had a look at the Request Response pattern but the API clearly states that using that Socket with multiple Threads is a bad idea. Maybe i have missed something or ZeroMQ is more intelligent than i know of. If you need any further information just post a comment and i will do my best to give the information.I had also a look at the provided examples: Code ExamplesHere is the Socket description: ZMQ-Socket
 
Top