Hello, I use
http://socketo.me/docs/push example! everything works perfect I already have 10 topics on my website...
Like ! Live updating online users, notifications etc...and now I wan't to extend the application ! And the next goal is to make a Instant Messagin Application with websockets!
The question is! How do I send one message to a specific user! My code for pull function is :
$entryData = json_decode($entry, true);
// If the lookup topic object isn't set there is no one to publish to
if (!array_key_exists($entryData['category'], $this->subscribedTopics))
{
return;
}
$topic = $this->subscribedTopics[$entryData['category']];
// re-send the data to all the clients subscribed to that category
$topic->broadcast($entryData);