/** * 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); }
public function __construct($fr, $to) { parent::__construct(); // init shared space $this->ports = range($fr, $to); }
/** * Set max sub processes number * * @param int $num */ public function setMaxProcess($num) { self::$maxProcessNum = intval($num); }