public function onFrame($data, $type)
{
if (!isset($this->route)) {
return false;
}
try {
$this->route->onWakeup();
$this->route->onFrame($data, $type);
} catch (\Exception $e) {
Daemon::uncaughtExceptionHandler($e);
}
if ($this->route) {
$this->route->onSleep();
}
return true;
}