public function read($size)
    {
        $this->_checkStream();
        $data = @fread($this->_stream, $size);
        if ($data === false) {
            throw new Client\Exception('Error reading data from socket');
        }
        return $data;
    }
public function read($size)
    {
        $this->_checkStream();
        $data = @fread($this->_stream, $size);
        if ($data === false) {
            throw new Client\Exception('Error reading data from socket');
        }
        return $data;
    }
public function read ( $ size ) { $ this -> _checkStream ( ) ; $ data = @ fread ( $ this -> _stream , $ size ) ; if ( $ data === false ) { throw new Client \ Exception ( 'Error reading data from socket' ) ; } return $ data ; }
Returns a specified amount of data.

@param integer $size  The number of bytes to read from the socket.

@throws Horde\Socket\Client\Exception
@return string  $size bytes of data from the socket.
Returns a specified amount of data .