|
@@ -51,9 +51,9 @@ class WebSocketServer extends Command
|
|
|
public function onMessage(ConnectionInterface $from, $msg)
|
|
|
{
|
|
|
echo "Message from {$from->resourceId}: $msg\n";
|
|
|
+ $queueName = 'log_queue'; // 队列名称
|
|
|
+ $logData = Redis::lpop($queueName);
|
|
|
foreach ($this->server->clients as $client) {
|
|
|
- $queueName = 'log_queue'; // 队列名称
|
|
|
- $logData = Redis::lpop($queueName);
|
|
|
$client->send($logData);
|
|
|
}
|
|
|
}
|