public function s2c($redis)
{
if (!$redis) {
return;
}
list(, $chan, $msg) = $redis->result;
$frames = json_decode($msg, true);
if (!is_array($frames) || !sizeof($frames)) {
return;
}
foreach ($frames as $frame) {
$this->sendFrame($frame);
}
if (!in_array('stream', $this->pollMode)) {
$this->heartbeatOnFinish = false;
$this->stop();
return;
}
if ($this->gcEnabled) {
$this->gcCheck();
}
}