Kraken\Stream\AsyncStream::close PHP Method

close() public method

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