public function read(): string
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		$response = '';
		$continue = true;

		while ($continue == true)
		{
			$data = null;

			try
			{
				$data = $this->readLine();
			}
			catch (\Exception $e)
			{
				$continue = false;
			}

			if (!is_null($data))
			{
				$response .= $data;
			}
		}

		return $response;
	}
public function read(): string
	{
		if ($this->connected() === false)
		{
			throw new \Exception('Not connected');
		}

		$response = '';
		$continue = true;

		while ($continue == true)
		{
			$data = null;

			try
			{
				$data = $this->readLine();
			}
			catch (\Exception $e)
			{
				$continue = false;
			}

			if (!is_null($data))
			{
				$response .= $data;
			}
		}

		return $response;
	}
public function read ( ) : string { if ( $ this -> connected ( ) === false ) { throw new \ Exception ( 'Not connected' ) ; } $ response = '' ; $ continue = true ; while ( $ continue == true ) { $ data = null ; try { $ data = $ this -> readLine ( ) ; } catch ( \ Exception $ e ) { $ continue = false ; } if ( ! is_null ( $ data ) ) { $ response .= $ data ; } } return $ response ; }
Read all data from the stream.
@return string
@throws \Exception
Read all data from the stream .