I think it's a great idea and was playing with it also. It should go into the low level API IMO so it's available to all languages.
You could make a single API call, zmq_new_endpoint () which has different syntax for the endpoint depending on direction. E.g. by default, it's a bind but if you prefix with ">" it's a connect. It could also be nice to consider endpoint resolution in libzmq using an internal protocol as we do for authentication. I.e. bind/connect to "$myname" which gets resolved by a plugin into "tcp://hostname:port". -Pieter On Tue, Oct 29, 2013 at 3:54 AM, Uli Köhler <[email protected]> wrote: > Hi everyone, > I created some convenience functions for my own usage in the last months, > and I think it might be a good idea to share them with you: > https://gist.github.com/ulikoehler/7208431 > > They are based upon the idea that many code locations only need one > bind/connect per socket immediately after the socket is created, and you > should therefore be able to do both socket creation and connect/bind in a > single step. > > Right now they are not documented, but if you think it's worth the effort, I > could submit a pull request to libzmq and/or CZMQ. > > The advantage is that users will have to write less code. The downside, > however, is that it would add two more functions to the API. > > Best regards, Uli > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- - Pieter Hintjens CEO of iMatix.com Founder of ZeroMQ community blog: http://hintjens.com _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
