Kraken\Loop\LoopInterface::addWriteStream PHP Method

addWriteStream() public method

Register a listener to be notified when a stream is ready to write.
public addWriteStream ( resource $stream, callable $listener )
$stream resource
$listener callable
    public function addWriteStream($stream, callable $listener);

Usage Example

コード例 #1
0
ファイル: ZmqBuffer.php プロジェクト: kraken-php/framework
 /**
  * Send message.
  *
  * @param string $message
  * @return bool
  */
 public function send($message)
 {
     if ($this->closed) {
         return false;
     }
     $this->messages[] = $message;
     if (!$this->listening) {
         $this->listening = true;
         $this->loop->addWriteStream($this->fd, $this->writeListener);
     }
     return true;
 }
All Usage Examples Of Kraken\Loop\LoopInterface::addWriteStream