当前位置: 首页>>代码示例>>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;未经允许,请勿转载。