Logo Search packages:      
Sourcecode: paramiko version File versions  Download package

def paramiko::channel::Channel::setblocking (   self,
  blocking 
)

Set blocking or non-blocking mode of the channel: if C{blocking} is 0,
the channel is set to non-blocking mode; otherwise it's set to blocking
mode.  Initially all channels are in blocking mode.

In non-blocking mode, if a L{recv} call doesn't find any data, or if a
L{send} call can't immediately dispose of the data, an error exception
is raised.  In blocking mode, the calls block until they can proceed.

C{chan.setblocking(0)} is equivalent to C{chan.settimeout(0)};
C{chan.setblocking(1)} is equivalent to C{chan.settimeout(None)}.

@param blocking: 0 to set non-blocking mode; non-0 to set blocking
mode.
@type blocking: int

Definition at line 438 of file channel.py.

00438                                    :
        """
        Set blocking or non-blocking mode of the channel: if C{blocking} is 0,
        the channel is set to non-blocking mode; otherwise it's set to blocking
        mode.  Initially all channels are in blocking mode.

        In non-blocking mode, if a L{recv} call doesn't find any data, or if a
        L{send} call can't immediately dispose of the data, an error exception
        is raised.  In blocking mode, the calls block until they can proceed.

        C{chan.setblocking(0)} is equivalent to C{chan.settimeout(0)};
        C{chan.setblocking(1)} is equivalent to C{chan.settimeout(None)}.

        @param blocking: 0 to set non-blocking mode; non-0 to set blocking
        mode.
        @type blocking: int
        """
        if blocking:
            self.settimeout(None)
        else:
            self.settimeout(0.0)

    def close(self):


Generated by  Doxygen 1.6.0   Back to index