當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Connection::getStream方法代碼示例

本文整理匯總了PHP中Connection::getStream方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connection::getStream方法的具體用法?PHP Connection::getStream怎麽用?PHP Connection::getStream使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Connection的用法示例。


在下文中一共展示了Connection::getStream方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testConstructor

 /**
  * @covers PhiKettle\Kettle::__construct
  * @covers PhiKettle\Kettle::getStream
  * @covers PhiKettle\Kettle::getState
  */
 public function testConstructor()
 {
     $connection = new Connection($this->host, $this->port, new DummyLoop());
     $kettle = new Kettle($connection);
     $this->assertEquals(new KettleState(), $kettle->getState());
     $this->assertEquals($connection->getStream(), $kettle->getStream());
 }
開發者ID:norbea,項目名稱:PhiKettle,代碼行數:12,代碼來源:KettleTest.php

示例2: is

 /**
  * Check if the current node belongs to a specific server.
  *
  * @param   \Hoa\Socket\Connection  $server    Server.
  * @return  bool
  */
 public function is(Connection $server)
 {
     return $this->getStream() === $server->getStream();
 }
開發者ID:shulard,項目名稱:Socket,代碼行數:10,代碼來源:Client.php

示例3: __construct

 /**
  * Create a kettle object for passed connection object
  *
  * @param Connection $connection
  */
 public function __construct(Connection $connection)
 {
     $this->state = new KettleState();
     $this->stream = $connection->getStream();
 }
開發者ID:norbea,項目名稱:PhiKettle,代碼行數:10,代碼來源:Kettle.php

示例4: consider

 /**
  * Consider another server when selecting connection.
  *
  * @param   \Hoa\Socket\Connection  $other    Other server.
  * @return  \Hoa\Socket\Server
  */
 public function consider(Connection $other)
 {
     if ($other instanceof Client) {
         if (true === $other->isDisconnected()) {
             $other->connect();
         }
         $this->_stack[] = $other->getStream();
         return $this;
     }
     if (true === $other->isDisconnected()) {
         $other->connectAndWait();
     }
     $i = count($this->_masters);
     $this->_masters[$i] = $other->_master;
     $this->_servers[$i] = $other;
     $this->_stack[] = $this->_masters[$i];
     return $this;
 }
開發者ID:robertgeb,項目名稱:Map-Project,代碼行數:24,代碼來源:Server.php

示例5: delete

 public function delete($path)
 {
     return @ftp_delete($this->connection->getStream(), $path);
 }
開發者ID:buuum,項目名稱:ftp,代碼行數:4,代碼來源:FtpWrapper.php


注:本文中的Connection::getStream方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。