On 08/08/13 14:00, william eddie wrote:
I have read through transport.h and the tcp transport. Is there any method for calling nn_global_add_transport(); without changing core/global.c itself? Otherwise all transports/sp's will have to be merged into nanomsg, or manually aggregated from nanomsg forks by users.
In theory, it's possible to compile the transports as libraries and load them from the core library on the fly. I even have a code for that, so it can be done relatively easily.
However, managing a set of dynamically loaded libraries is a pain in the ass. You have to place them on correct paths, ensure that individual processes using nanomsg have correct privileges, manage the versioning of the plugin separately from the versioning of the main library, create special installers for deploying the plugins to your customers etc.
All in all, merging the code into the mainline and adding 2 lines of code into global.c is a pretty good tradeoff for all the above.
Martin