src/Daemon/Service.php
public function onStart(SwooleServer $server)
    {
        @cli_set_process_title($this->name . ': master process/reactor threads; port=' . $this->swoolePort);
        // Send SIGTERM to master pid to shutdown service
        $this->pid = $server->master_pid;
        // Send SIGUSR1 to master pid to reload workers
        $this->managerPid = $server->manager_pid;

        $this->startCommandHandler();

        $this->updateServiceInfo('current', [
            'pid' => $this->pid,
            'manager_pid' => $this->managerPid,
            'port' => $this->swoolePort,
        ]);
        $this->cliOutput('info', "pid = {$this->pid}; port = {$this->swoolePort}");
        $this->cliOutput('info', 'Service started.');
    }
public function onStart(SwooleServer $server)
    {
        @cli_set_process_title($this->name . ': master process/reactor threads; port=' . $this->swoolePort);
        // Send SIGTERM to master pid to shutdown service
        $this->pid = $server->master_pid;
        // Send SIGUSR1 to master pid to reload workers
        $this->managerPid = $server->manager_pid;

        $this->startCommandHandler();

        $this->updateServiceInfo('current', [
            'pid' => $this->pid,
            'manager_pid' => $this->managerPid,
            'port' => $this->swoolePort,
        ]);
        $this->cliOutput('info', "pid = {$this->pid}; port = {$this->swoolePort}");
        $this->cliOutput('info', 'Service started.');
    }
public function onStart ( SwooleServer $ server ) { @ cli_set_process_title ( $ this -> name . ': master process/reactor threads; port=' . $ this -> swoolePort ) ; // Send SIGTERM to master pid to shutdown service $ this -> pid = $ server -> master_pid ; // Send SIGUSR1 to master pid to reload workers $ this -> managerPid = $ server -> manager_pid ; $ this -> startCommandHandler ( ) ; $ this -> updateServiceInfo ( 'current' , [ 'pid' => $ this -> pid , 'manager_pid' => $ this -> managerPid , 'port' => $ this -> swoolePort , ] ) ; $ this -> cliOutput ( 'info' , "pid = {$this->pid}; port = {$this->swoolePort}" ) ; $ this -> cliOutput ( 'info' , 'Service started.' ) ; }
Callback after service started
@param SwooleServer $server
Callback after service started