def _cbSFTP(self, result): client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived log.debug('setting clientHandle to be %s' % client) self.clientHandle.callback(client) log.debug('Created SFTP Client')
def _cbSFTP(self, result): # great explanation here http://stackoverflow.com/questions/5195427/twisted-conch-filetransfer client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived #here we fire the _sftp Deferred with the reference to the client self.conn._sftp.callback(client) self.conn.transport.transport.setTcpNoDelay(1)
def channelOpen(self, whatever): yield self.conn.sendRequest(self, 'subsystem', NS('sftp'), wantReply=True) client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived self.conn._sftp.callback(client)
def _cbSFTP(self, result): client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived self.client = client self.conn['sftp'] = self
def _cbSFTP(self, result): client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived self.conn._sftp.callback((self.conn.transport, client))
def _cbFTP(self, ignore): client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived ACTIVE_CLIENTS.update({self.conn.transport.transport.addr: client}) self.conn._sftp.callback(None)
def _cbSFTP(self, result): client = FileTransferClient() client.makeConnection(self) self.dataReceived = client.dataReceived self.conn._sftp.callback(client)