public function close()
    {
        if ($this->closed)
        {
            return;
        }

        $this->emit('end', [ $this ]);
        $this->loop->removeStream($this->fd);
        $this->buffer->flushListeners();
        $this->flushListeners();
        unset($this->socket);
        $this->closed = true;
    }
public function close()
    {
        if ($this->closed)
        {
            return;
        }

        $this->emit('end', [ $this ]);
        $this->loop->removeStream($this->fd);
        $this->buffer->flushListeners();
        $this->flushListeners();
        unset($this->socket);
        $this->closed = true;
    }
public function close ( ) { if ( $ this -> closed ) { return ; } $ this -> emit ( 'end' , [ $ this ] ) ; $ this -> loop -> removeStream ( $ this -> fd ) ; $ this -> buffer -> flushListeners ( ) ; $ this -> flushListeners ( ) ; unset ( $ this -> socket ) ; $ this -> closed = true ; }
Close connection and discard not sent data.
Close connection and discard not sent data .