public function flush()
	{
		if($this->stream === NULL)
		{
			throw new \RuntimeException(sprintf('Cannot flush detached stream'));
		}
		
		if(strlen($this->buffer))
		{
			$this->stream->write(sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer));
			$this->buffer = '';
		}
	}
public function flush()
	{
		if($this->stream === NULL)
		{
			throw new \RuntimeException(sprintf('Cannot flush detached stream'));
		}
		
		if(strlen($this->buffer))
		{
			$this->stream->write(sprintf("%X\r\n%s\r\n", strlen($this->buffer), $this->buffer));
			$this->buffer = '';
		}
	}
public function flush ( ) { if ( $ this -> stream === NULL ) { throw new \ RuntimeException ( sprintf ( 'Cannot flush detached stream' ) ) ; } if ( strlen ( $ this -> buffer ) ) { $ this -> stream -> write ( sprintf ( "%X\r\n%s\r\n" , strlen ( $ this -> buffer ) , $ this -> buffer ) ) ; $ this -> buffer = '' ; } }
Flush the current write buffer to the underlying output stream.

Does nothing if the write buffer is empty.

@throws \RuntimeException When the stream has been detached.
Flush the current write buffer to the underlying output stream .