[zeromq-dev] Bind to local ip address

fredrik danerklint fredan-zmq at fredan.se
Fri Dec 9 14:41:23 CET 2011


Martin,

Here's the patch.



2011-12-09 00:22, Martin Sustrik skrev:
> Hi Fredrik,
>
>> I've started to make a patch to be able to bind to a local ip address
>> when using zmq_connect / zmq_bind. I need this since I have a bunch of
>> ip addresses on the machines that I will use 0mq on.
>>
>> It's only a few lines in tcp_connecter.cpp to be able to do this. Have
>> tested locally and verified with $netstat -tn to see that i actually
>> works. (The hole patchfile is only 31 lines).
>
> Nice!
>
>> However, I don't have the knowledge for make the changes that's needed
>> to the api to add an additionally parameter for the functions
>> zmq_connect and zmq_bind.
>
> What about using PGM-like format for the address:
>
> zmq_connect (s, "tcp://eth0;192.168.0.111:5555");
>
> Martin
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>

-- 
//fredan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind1.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111209/e3948bcf/attachment.bin>


More information about the zeromq-dev mailing list