コード例 #1
0
 /**
  * Loads default setting.
  * @return void
  */
 public static function initSettings()
 {
     Daemon::$version = file_get_contents('VERSION', true);
     Daemon::$config = new Config\Object();
     if (preg_match('~BSD~i', php_uname('s')) && !defined("SO_REUSEPORT")) {
         // @TODO: better if-BSD check
         define('SO_REUSEPORT', 0x200);
     }
 }
コード例 #2
0
ファイル: Daemon.php プロジェクト: kakserpom/phpdaemon
 /**
  * Loads default setting.
  * @return void
  */
 public static function initSettings()
 {
     Daemon::$version = file_get_contents('VERSION', true);
     Daemon::$config = new Config\Object();
     if (!defined('SO_REUSEPORT') && mb_orig_strpos(php_uname('s'), 'BSD') !== false) {
         // @TODO: better if-BSD check
         define('SO_REUSEPORT', 0x200);
     }
 }