Closed softshape closed 9 years ago
Hi @softshape
I see at least two problems here. 1) since you are not saving the messages on server your client will receive only the message published while it is connected. 2) even if you store the messages on server, your client are not sending the lime and tag of the last message received
using your current configuration try to open one console with
curl localhost/tickets/api/updates/12345
and publish a message on another
curl localhost/tickets/api/pub?id=12345 -d test
you will receive the message and be disconnected. This shows that long polling is working. To achieve a proper usage on browser take a look on the examples on documentation. I also recommend to use the pushstream.js if you have problems doing your own client code.
Hi all,
after updating to 0.4.1 version I can't make it work.
My nginx configuration -
For tests, I do on the server:
wget http://127.0.0.1/tickets/api/pub?id=12345 --post-data=TEST
It returns:
{"channel": "12345", "published_messages": "0", "stored_messages": "0", "subscribers": "1"}
But to the browser it sends nothing. I listen to /tickets/api/updates/12345 in JavaScript and it's quite. My jQuery code is:
What can be the problem?