Пример #1
0
 protected function init()
 {
     // 运行2个服务实例分别监听不同的端口 @todo 也可以在daemon中运行多个实例
     $this->debugServer = new debugWS('0.0.0.0', 8888);
     //        $this->debugServer->bindSocket();
     $this->bindSocket(Config::get('host'), Config::get('port'));
 }
Пример #2
0
 public function bindSocket($addr = null, $port = null)
 {
     if ($addr === null && $port === null) {
         $addr = Config::get('host');
         $port = Config::get('port');
     }
     parent::bindSocket($addr, $port);
 }