def recv_stderr(self, nbytes):
try:<EOL><INDENT>out = self.in_stderr_buffer.read(nbytes, self.timeout)<EOL><DEDENT>except PipeTimeout:<EOL><INDENT>raise socket.timeout()<EOL><DEDENT>ack = self._check_add_window(len(out))<EOL>if ack > <NUM_LIT:0>:<EOL><INDENT>m = Message()<EOL>m.add_byte(cMSG_CHANNEL_WINDOW_ADJUST)<EOL>m.add_int(self.remote_chanid)<EOL>m.add_int(ack)<EOL>self.transport._send_user_message(m)<EOL><DEDENT>return out<EOL>
Receive data from the channel's stderr stream.  Only channels using
`exec_command` or `invoke_shell` without a pty will ever have data
on the stderr stream.  The return value is a string representing the
data received.  The maximum amount of data to be received at once is
specified by ``nbytes``.  If a string of length zero is returned, the
channel stream has closed.

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

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

.. versionadded:: 1.1