React\Stream\Stream::end PHP Method

end() public method

public end ( $data = null )
    public function end($data = null)
    {
        if (!$this->writable) {
            return;
        }
        $this->closing = true;
        $this->readable = false;
        $this->writable = false;
        $this->buffer->on('close', array($this, 'close'));
        $this->buffer->end($data);
    }

Usage Example

Example #1
0
 public function dispose()
 {
     if (!$this->hasObservers()) {
         parent::dispose();
         $this->stream->end();
     }
 }
All Usage Examples Of React\Stream\Stream::end