zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
438 stars 197 forks source link

Proxy equivalent? #129

Closed kaatish closed 9 years ago

kaatish commented 9 years ago

Is there a proxy equivalent in zmqpp as used in the mtserver example? I can't seem to find any in the source code.

xaqq commented 9 years ago

Hello, No there is no proxy in zmqpp. Presumably because no-one ever needed it yet.

kaatish commented 9 years ago

Will this be implemented in the future? Or a better question would be, how should I implement the mtserver example with zmqpp?

xaqq commented 9 years ago

Will this be implemented in the future?

It could, if someone has the time to do it.

Or a better question would be, how should I implement the mtserver example with zmqpp? I'm going to assume that your problem is writing the proxy code.

A (simple) proxy is actually fairly easy to write: you poll on 2 sockets, A and B. What your read from A, you write to B. And what you read from B, you write to A.

xaqq commented 9 years ago

So I went ahead and implemented a wrapper around zmq_proxy. Wait till its merge and it'll be ready to use (the same way as in your example).

xaqq commented 9 years ago

I am closing this. Feel free to reopen or create a new ticket of you have some issue with this :)