diff --git a/system/Process/Process.php b/system/Process/Process.php index 0833ee26..4f7b30a4 100644 --- a/system/Process/Process.php +++ b/system/Process/Process.php @@ -17,46 +17,4 @@ use Swoole\Process\Pool; abstract class Process extends Component { - /** @var Application */ - protected $application; - - - /** - * Process constructor. - * @param $application - * @param array $config - */ - public function __construct(Application $application, $config = []) - { - $this->application = $application; - parent::__construct([]); - } - - - /** - * @param \Swoole\Process $process - * @return mixed - */ - abstract public function onHandler(\Swoole\Process $process); - - - /** - * @param $workerId - * @return Socket - * @throws ComponentException - */ - protected function exportSocket($workerId) - { - return $this->application->get(Pool::class)->getProcess($workerId)->exportSocket(); - } - - - /** - */ - protected function start() - { - $_process = new \Swoole\Process([$this, 'onHandler'], false, null, true); - $_process->start(); - } - }