-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Would there be a way to use PHP to send an event to the server, which will emit the message to the clients?
I could be something like this:
$i = 0;
while($i <= 1000){
echo $i."\n";
$i++;
$messageEvent = new Event\MessageEvent();
$messageEvent->setMessage(array(
'event' => 'addme',
'message' => "Count $i",
));
$messageEvent->setEndpoint(null);
$dispatcher = Event\EventDispatcher::getDispatcher();
$dispatcher->dispatch("server.addme", $messageEvent, null);
sleep(1);
}
I wish to build an application that reacts on events in PHP and pushes these through socketio. I think the best way would be to integrate this in the server, instead of having a client that'll post it to the server, who will need to handle the events.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels