Ok Guys. Thanks for all the help. As soon as I added the "" as the second 
option for setOpt as instructed by Mikko. I received the expected message from 
the server. Now I have a question, for an AJAX implementation, would it be 
better to receive the messages through a loop say 20loops or to just receive 
the messages one per AJAX request

 
Regards,
Olanrewaju Lawal
Web Developer / Programmer
+2348053568948



________________________________
From: Mikko Koppanen <mikko.koppa...@gmail.com>
To: ZeroMQ development list <zeromq-dev@lists.zeromq.org>
Sent: Wednesday, October 12, 2011 1:30 AM
Subject: Re: [zeromq-dev] PHP Error on Ubuntu

On Wed, Oct 12, 2011 at 1:21 AM, lanre lawal <lawillas4e...@yahoo.com> wrote:
> Ok Ali. But i'm pretty new to this whole socket thing. The guy am working
> with actually achieved the same thing as I want to on C#. The code is pretty
> much the same as what I have and he says he's receiving the messages. You
> said the send and recv methods are in block mode by default. How can I
> unblock it so that the messages come in. This task is pretty easy as I'm not
> doing any complex socket implementation. Can you go through my short code to
> see where I could have gone wrong? Thank you

Hi,

setSockOpt takes two arguments rather than one. $socket->setsockopt
(ZMQ::SOCKOPT_SUBSCRIBE, ""). As mentioned before the
http://zguide.zeromq.org/page:all contains examples in PHP as well,
including publish-subscribe examples.

-- 
Mikko Koppanen
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to