/** * constructor * * @access public * @param string hostname * @param integer port * @param string driver, see Net_Server documentation */ protected function __construct($hostname, $port = 80, $documentRootUrl = '/', Gpf_Net_Server $driver = null) { $this->documentRootUrl = rtrim(str_replace('\\', '/', $documentRootUrl), '/') . '/'; if ($driver === null) { $this->driver = new Gpf_Net_Server_Driver_Sequential($hostname, $port); } else { $this->driver = $driver; $this->driver->setAddress($hostname, $port); } $this->driver->setListener($this); }