addReadStream() public method

Register a listener to be notified when a stream is ready to read.
public addReadStream ( resource $stream, callable $listener )
$stream resource
$listener callable
コード例 #1
0
ファイル: ZmqSocket.php プロジェクト: kraken-php/framework
 /**
  * Attach read listener.
  */
 public function attachReadListener()
 {
     $this->loop->addReadStream($this->fd, [$this, 'handleEvent']);
 }
コード例 #2
0
ファイル: ReactLoop.php プロジェクト: kraken-php/framework
 /**
  * @override
  * @inheritDoc
  */
 public function addReadStream($stream, callable $listener)
 {
     $this->loop->addReadStream($stream, $listener);
 }