wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

Send message to channel by name #173

Closed jpascal closed 9 years ago

jpascal commented 9 years ago

How I can send message to channel by name using pushstream.js?

wandenberg commented 9 years ago

If you want to send the message to all channels which you are connected in, just call the sendMessage on your pushshtream instance like

var pushstream = new PushStream({...});
pushstream.sendMessage(message, successCallback, errorCallback);

If you want to puslish a message to a specific channel you could do like this

PushStream.sendMessage(url, message, successCallback, errorCallback);
jpascal commented 9 years ago

Thanks