channel = new MultiStreamChannel(); $this->timer = new Timer([ $this, "update" ]); } public function createClient() : Client { /** @var ChannelInterface $channel */ $channel = $this->channel->createClient(); $client = new Client($channel); return $client; } public function update() { while ($msg = $this->channel->receive()) { $this->channel->send($msg); } } }