[zeromq-dev] re: puzzled with zmq_socket bind and connect

Pieter Hintjens pieterh at gmail.com
Thu Nov 8 13:31:44 CET 2012


Yes. You can bind any socket to an interface.
On Nov 8, 2012 8:46 PM, "猫" <charleszhangjie at qq.com> wrote:

> Can a REQ zmq_socket bind to a specific interface?
> we know a Ping program, an useful command on Unix, can bind a specific src
> adress and ping a remote host, using -I option. Can a zmq_socket do the
> same thing? I don't find it in zmq guide.
> ( As the Guide says, a REQ zmq_socket connects to a REP zmq_socket )
>
> ------------------
>
>
> **
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "Pieter Hintjens"<ph at imatix.com>;
> *发送时间:* 2012年11月8日(星期四) 下午4:35
> *收件人:* "ZeroMQ development list"<zeromq-dev at lists.zeromq.org>; **
> *主题:* Re: [zeromq-dev] puzzled with zmq_socket bind and connect
>
> You can bind to a specific interface (e.g. "tcp://eth0:5550") and connect
> to specific IP addresses.
>
>
> On Wed, Nov 7, 2012 at 11:56 AM, 猫 <charleszhangjie at qq.com> wrote:
>
>> I am a fresh programer of 0mq. Could you tell me how to comprehend this
>> feature of 0mq:
>>
>>    - It queues messages automatically when needed. It does this
>>    intelligently, pushing messages *as close as possible* to the
>>    receiver before queuing them.
>>
>> For example, I run a 0mq client on one linux machine with multi ip
>> addresses configured using REQ-REP pattern. Different ip address referes to
>> different route information. when zmq client connects to 0mq server on
>> another machine, which ip adrress is binded to the client zmq_socket? Can I
>> program to determine a specific ip so that I can trace the network package
>> it sends.
>>
>> ------------------
>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
> **
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121108/ed22ee9a/attachment.htm>


More information about the zeromq-dev mailing list