On Nov 1, 2011, at 5:24 AM, Martin Sustrik wrote:
> On 11/01/2011 11:05 AM, asif saeed wrote:
>
>> I am a newbie to 0MQ and want to use it in my project. The page at
>> http://nichol.as/zeromq-an-introduction seems to suggest that you can
>> use only *one* transport per application. I believe that's not the case
>> and that I can use multiple transport types in a single app. Right?
>
> Right.
To expand a little on Martin's response, binding/connecting to multiple
endpoints is one of the strengths of 0mq.
For example, let's assume you have built a service locator using 0mq for
messaging. You may have "clients" within the same process, on the same box and
on the same LAN that all need to use the locator. The locator *could* utilize
multiple transports to most efficiently process requests.
socket.bind("inproc://service_locator");
socket.bind("ipc:///ipcsockets/service_locator");
socket.bind("tcp://192.168.0.100:12000"); # LAN requests
socket.connect("tcp://192.168.0.105:5000"); # connect to device for WAN requests
Note that you can bind *and* connect the very same socket.
cr
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev