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); }
public function dispose() { if (!$this->hasObservers()) { parent::dispose(); $this->stream->end(); } }