[zeromq-dev] Protocol Plugins

Lyle Thompson lthompson at ixiacom.com
Tue Feb 11 00:11:05 CET 2014

Hi ZeroMQ experts,
I am investigating how one might add SOCKS proxy support to 0mq, and of course there are several options. But I was thinking that the most elegant would be to add support for a "socks" protocol to 0mq. I took a look at the source code, and I was a bit surprised to find that the protocols are not pluggable. At the first level, I don't think this would be very hard to do (at least for *some* of the protocols); Just add a registration mechanism and change the code that is executed as the result of hard-coded protocol checks into calls through a table of available plugins.
This would make it a bit easier to add new protocols (especially if they are similar or running on top of existing ones, as is the case for SOCKS). Presumably, one would just need to compile the module and link it into the code via the make file.
Of course it would be nicer if it were dynamically linked (i.e. the "second level"), but I don't know of a platform independent way to do this that would make sense for 0mq. Of course it could be done with #ifdefs and what not, but would it be worth it?
My motivation is that my company uses 0mq in a commercial product. And while we don't mind contributing, we'd rather contribute a general improvement than a very specific one (SOCKS), that many people would not need or want.
I know this is a very high-level idea at this point, so blast away and let's see if there's anything left that worth implementing :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140210/fa20399b/attachment.htm>

More information about the zeromq-dev mailing list