(self, host, port)
return self.voidcmd(cmd)
Send an EPRT command with the current host and the given port number.
Send an EPRT command with the current host and the given port number.
Send an EPRT command with the current host and the given port number .
def sendeprt(self, host, port):
        '''Send an EPRT command with the current host and the given port number.'''
        af = 0
        if self.af == socket.AF_INET:
            af = 1
        if self.af == socket.AF_INET6:
            af = 2
        if af == 0:
            raise error_proto('unsupported address family')
        fields = ['', repr(af), host, repr(port), '']
        cmd = 'EPRT ' + '|'.join(fields)
        return self.voidcmd(cmd)
def sendeprt ( self , host , port ) : af = 0 if self . af == socket . AF_INET : af = 1 if self . af == socket . AF_INET6 : af = 2 if af == 0 : raise error_proto ( 'unsupported address family' ) fields = [ '' , repr ( af ) , host , repr ( port ) , '' ] cmd = 'EPRT ' + '|' . join ( fields ) return self . voidcmd ( cmd )