public function close()
    {
        if($this->connection !== null)
        {
            if ($this->writeEvent) {
                $this->loop->removeWriteStream($this->connection);
            }
            $this->loop->removeReadStream($this->connection);
            fclose($this->connection);
            $this->emit('close', array($this));
        }
        $this->connection = null;
    }
public function close()
    {
        if($this->connection !== null)
        {
            if ($this->writeEvent) {
                $this->loop->removeWriteStream($this->connection);
            }
            $this->loop->removeReadStream($this->connection);
            fclose($this->connection);
            $this->emit('close', array($this));
        }
        $this->connection = null;
    }
public function close ( ) { if ( $ this -> connection !== null ) { if ( $ this -> writeEvent ) { $ this -> loop -> removeWriteStream ( $ this -> connection ) ; } $ this -> loop -> removeReadStream ( $ this -> connection ) ; fclose ( $ this -> connection ) ; $ this -> emit ( 'close' , array ( $ this ) ) ; } $ this -> connection = null ; }
Closes any underlying stream and removes events
Closes any underlying stream and removes events