[zeromq-dev] Connecting via Websockets to PHP ZeroMQ socket
Ian Barber
ian.barber at gmail.com
Wed Mar 28 15:27:32 CEST 2012
On Wed, Mar 28, 2012 at 1:45 PM, Max <nash12 at gmail.com> wrote:
> Hi,
>
> has anyone had success in connecting via Javascript using Websockets
> to a serverside PHP ZeroMQ socket/server?
>
> Basically I am using Rasmus server code from
> http://toys.lerdorf.com/archives/57-ZeroMQ-+-libevent-in-PHP.html
> which works (I changed the socket tcp address so that outside
> connections are allowed). But as soon as I connect to that socket from
> my Browser using a Websocket the PHP script tells me it received a
> new connection but it doesnt receive any data.
>
You're trying to connect a websockets client to a ZeroMQ socket, that is
not going to work (Rasmus's example is just showing you how to use libevent
with ZMQ). You need something serving the websockets side and shuffling
between that and ZeroMQ - Mongrel2 is probably the easiest tool right now.
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120328/ff9d368a/attachment.htm>
More information about the zeromq-dev
mailing list