removeReadStream() public method

Remove the read event listener for the given stream.
public removeReadStream ( resource $stream )
$stream resource
示例#1
0
 /**
  * @dataProvider loopsProvider
  * @param LoopExtendedInterface|LoopModelInterface|mixed $loop
  */
 public function testApiRemoveReadStream_RemovesReadHandler_AfterReading($loop)
 {
     $stream = $this->createStream();
     $loop->addReadStream($stream, $this->expectCallableOnce());
     $this->writeToStream($stream, "foo\n");
     $loop->tick();
     $loop->removeReadStream($stream);
     $this->writeToStream($stream, "bar\n");
     $loop->tick();
     unset($stream);
     unset($loop);
 }
示例#2
0
 /**
  * @override
  * @inheritDoc
  */
 public function removeReadStream($stream)
 {
     $this->loop->removeReadStream($stream);
 }