-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I have 3 questions here...
- I'm trying to figure out how to pass the message received by the WS to the event loop, see code below.
- Is this the right way to handle ws messages asynchronously? I notice delays with the more topics I subscribe to.
- My IDE is showing that React Factory is deprecated, are there plans to stop usages of it in the future?
$loop = Factory::create();
$loop->addPeriodicTimer(1, function($message) {
var_dump('loop: ' . date('Y-m-d H:i:s'));
var_dump($message);
});
$api->setLoop($loop);
$api->subscribePublicChannels($query, $channels, function (array $message, WebSocket $ws, LoopInterface $loop) use(&$exchange, &$interval, &$results) {
// $loop->run();
// print $message['data']['symbol'] . PHP_EOL;
}
}, function ($code, $reason) {
echo "OnClose: {$code} {$reason}\n";
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request