public function close() { if ($this->closing) { return; } $this->closing = true; $this->readable = false; $this->writable = false; $this->emit('close', [$this]); $this->handleClose(); $this->emit('done', [$this]); }