Exemple #1
0
 public function Bootstrap()
 {
     $processes = Application::AutoBuildCollection('Process.php', \swoole_process::class);
     foreach ($processes as $processClass => $process) {
         if (Server::AddProcess($process)) {
             Log::Notice("User process {processClass} has added.", ['processClass' => get_class($process)]);
         }
     }
 }
Exemple #2
0
 protected function setConfig()
 {
     $swooleConfig = Config::Get('Swoole');
     foreach ($swooleConfig as $key => $item) {
         if ($swooleConfig[$key] === '') {
             unset($swooleConfig[$key]);
         }
     }
     $this->settingCheck($swooleConfig);
     Server::Set($swooleConfig);
     Config::Delete('Swoole');
 }
Exemple #3
0
 public function Bootstrap()
 {
     Server::Start();
 }