public function onFrame($data, $type) { D($data); if ($data === 'ping') { $this->client->sendFrame('pong'); } }