[zeromq-dev] XREQ socket connect to multi endpoints

Garrett Smith g at rre.tt
Mon Aug 29 17:40:52 CEST 2011


The REP socket expects an empty message part that separates the socket
IDs from the payload, which is handled for you by REQ, but not by
XREQ.

Like this:

client.send('', zmq.SNDMORE)
client.send('hello')

On Mon, Aug 29, 2011 at 10:24 AM, notedit <notedit at gmail.com> wrote:
> hello ,  anyone  can help me with my question?
> i just can not figure it out.
> many thanks
>
> 2011/8/29 notedit <notedit at gmail.com>
>>
>> i change the '*' to '127.0.0.1',but the client still can not work,
>> the client just stucks there.
>>
>> 2011/8/29 Pieter Hintjens <ph at imatix.com>
>>>
>>> The code is OK, but you're connecting to an address '*', which is not
>>> valid. Specify the real IP address, or domain name.
>>>
>>> -Pieter
>>>
>>> On Mon, Aug 29, 2011 at 7:25 AM, notedit <notedit at gmail.com> wrote:
>>> >
>>> > hi, i just have read the zero guide, and i  know DEALER/ROUTER
>>> > ==XREQ/XREP,
>>> > i alse read that a socket can connect to multi endpoints,
>>> > so i do a test, i try to use a xreq socket connect to multi  req
>>> > socket,
>>> > but it seems that it doesn't work.
>>> > this is my code
>>> > client : http://pastebin.com/jhcSdLgr
>>> > worker1: http://pastebin.com/iFtTkq5j
>>> > worker2: http://pastebin.com/jDQffB32
>>> > anyone can explain that to me?  many thanks
>>> > --
>>> >
>>> > Best Wishes..
>>> >
>>> >
>>> > _______________________________________________
>>> > 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
>>
>>
>>
>> --
>>
>> Best Wishes..
>>
>
>
>
> --
>
> Best Wishes..
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>



More information about the zeromq-dev mailing list