        length zero is returned, the channel stream has closed.

        :param int nbytes: maximum number of bytes to read.
        :return: received data, as a ``str``/``bytes``.

        :raises socket.timeout:
            if no data is ready before the timeout set by `settimeout`.
        r