コード例 #1
0
ファイル: Server.php プロジェクト: sdgdsffdsfff/pms-framework
 /**
  * Construct
  */
 public function __construct($host = '', $ports = array())
 {
     parent::__construct();
     // init shared space
     // init host address
     $this->host = $host ? (string) $host : PMS_SERVER_HOST;
     // init shared ports array
     $this->ports = $ports ? (array) $ports : Pms_Util::getServerPorts(PMS_SERVER_PORT);
     // init max process for server
     $this->setMaxProcess(count($ports));
     // clear pid file first
     // do only once !!!
     $this->__pid(false);
     // store parent process pid
     // do only once !!!
     $this->__pid(true);
 }
コード例 #2
0
ファイル: AdvancedServer.php プロジェクト: LWFeng/hush
 public function __construct($fr, $to)
 {
     parent::__construct();
     // init shared space
     $this->ports = range($fr, $to);
 }
コード例 #3
0
ファイル: Process.php プロジェクト: liningwang/camera-beijing
 /**
  * Set max sub processes number
  * 
  * @param int $num
  */
 public function setMaxProcess($num)
 {
     self::$maxProcessNum = intval($num);
 }