public function onFrame($data, $type)
{
if ($data === 'ping') {
$this->client->sendFrame('pong', 'STRING', function ($client) {
// optional. called when the frame is transmitted to the client
\PHPDaemon\Core\Daemon::log('ExampleWebSocket: \'pong\' received by client.');
});
}
}