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

def paramiko::channel::Channel::shutdown (   self,
  how 
)

Shut down one or both halves of the connection.  If C{how} is 0,
further receives are disallowed.  If C{how} is 1, further sends
are disallowed.  If C{how} is 2, further sends and receives are
disallowed.  This closes the stream in one or both directions.

@param how: 0 (stop receiving), 1 (stop sending), or 2 (stop
    receiving and sending).
@type how: int

Definition at line 806 of file channel.py.

00806                            :
        """
        Shut down one or both halves of the connection.  If C{how} is 0,
        further receives are disallowed.  If C{how} is 1, further sends
        are disallowed.  If C{how} is 2, further sends and receives are
        disallowed.  This closes the stream in one or both directions.

        @param how: 0 (stop receiving), 1 (stop sending), or 2 (stop
            receiving and sending).
        @type how: int
        """
        if (how == 0) or (how == 2):
            # feign "read" shutdown
            self.eof_received = 1
        if (how == 1) or (how == 2):
            self.lock.acquire()
            try:
                m = self._send_eof()
            finally:
                self.lock.release()
            if m is not None:
                self.transport._send_user_message(m)
    
    def shutdown_read(self):


Generated by  Doxygen 1.6.0   Back to index