[zeromq-dev] Paranoid Pirate

KIU Shueng Chuan nixchuan at gmail.com
Tue Aug 26 00:15:54 CEST 2014


The zmsg class api takes in char* and the pirate queue has code that passes
it identities as c_str(). This doesn't work since identities are not nul
terminated c strings and may contain nuls.

It works for the workers only because they explicitly set their own id to
something containing only characters. See s_set_id ().
On 26 Aug 2014 04:33, "Riskybiz" <riskybizlive at live.com> wrote:

> Dear zeromq developers,
>
>
>
>                 I'm trying to get the Paranoid Pirate pattern to operate
> on Debian Linux using zeromq-4.0.4.  (When I get it working on Linux then I
> will turn my attention to making it work on Windows).  The Paranoid
> Pirate Queue <http://pastebin.com/KTsn4Yq8> and the Paranoid Pirate Worker
> <http://pastebin.com/hLHRC2LB> are communicating and demonstrably
> heartbeating.  The problem is that the Lazy Pirate Client
> <http://pastebin.com/Ekd1ZGQF> does not appear to communicate properly or
> receive a reply message. Is anyone able to identify what is wrong here?
> There are a couple of other necessary files; zhelpers.h
> <http://pastebin.com/ir8bkQaU> and zmsg.hpp <http://pastebin.com/4KYir507>
> .
>
> I have changed int64_t more = 0; to  int more = 0; as kindly pointed out
> by KIU Shueng Chuan as being necessary for zeromq-3.2.x and higher.  Also
> added are some console print statements to trace what is actually going
> on.  In order to correct very long waiting times I have modified the delay
> periods built in to the pattern from those provided by the stock example in
> the zeromq guide.
>
> Hope someone is able to help.
>
> Thanks,
>
> Riskybiz.
>
>
>
> _______________________________________________
> 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/20140826/03acd436/attachment.html>


More information about the zeromq-dev mailing list