Пример #1
0
 /**
  * Constructor.
  *
  * @param TTransport $transport Underlying transport
  */
 public function __construct($transport = null, $protocols = null)
 {
     parent::__construct($transport, true, true);
     if ($protocols) {
         foreach ($protocols as $protocol) {
             $this->supportedProtocols[$protocol] = true;
         }
     }
 }
Пример #2
0
 public function __construct($transport = null, $protocols = null)
 {
     parent::__construct($transport, true, true);
     $this->readTrans_ = new \HH\Vector(array());
     $this->writeTrans_ = new \HH\Vector(array());
     $this->readHeaders = \HH\Map::hacklib_new(array(), array());
     $this->writeHeaders = \HH\Map::hacklib_new(array(), array());
     $this->persistentWriteHeaders = \HH\Map::hacklib_new(array(), array());
     $this->supportedProtocols = new \HH\Set(array(self::HEADER_CLIENT_TYPE, self::FRAMED_DEPRECATED, self::UNFRAMED_DEPRECATED, self::HTTP_CLIENT_TYPE));
     if (\hacklib_cast_as_boolean($protocols)) {
         $this->supportedProtocols->addAll($protocols);
     }
 }