Esempio n. 1
0
 private static function initClientFactories()
 {
     self::tryRegisterClientFactory("http", "\\Hprose\\Http\\Client");
     self::tryRegisterClientFactory("https", "\\Hprose\\Http\\Client");
     self::tryRegisterClientFactory("tcp", "\\Hprose\\Socket\\Client");
     self::tryRegisterClientFactory("ssl", "\\Hprose\\Socket\\Client");
     self::tryRegisterClientFactory("sslv2", "\\Hprose\\Socket\\Client");
     self::tryRegisterClientFactory("sslv3", "\\Hprose\\Socket\\Client");
     self::tryRegisterClientFactory("tls", "\\Hprose\\Socket\\Client");
     self::tryRegisterClientFactory("unix", "\\Hprose\\Socket\\Client");
     self::$clientFactoriesInited = true;
 }
Esempio n. 2
0
 public function useService($url = '', $namespace = '')
 {
     $serviceProxy = parent::useService($url, $namespace);
     if ($url) {
         $url = parse_url($url);
         $this->secure = strtolower($url['scheme']) == 'https';
         $this->host = strtolower($url['host']);
         $this->path = $url['path'];
         $this->timeout = 30000;
         $this->keepAlive = true;
         $this->keepAliveTimeout = 300;
     }
     return $serviceProxy;
 }