'Initiate a transfer over the data connection.
If the transfer is active, send a port command and the
transfer command, and accept the connection.  If the server is
passive, send a pasv command, connect to it, and start the
transfer command.  Either way, return the socket for the
connection and the expected size of the transfer.  The
expected size may be None if it could not be determined.
Optional `rest\' argument can be a string that is sent as the
argument to a REST command.  This is essentially a server
marker used to tell the server to skip over any data up to the
given marker.'

def ntransfercmd(self, cmd, rest=None):

    size = None
    if self.passiveserver:
        (host, port) = self.makepasv()
        conn = socket.create_connection((host, port), self.timeout)
        if (rest is not None):
            self.sendcmd(('REST    %s' % rest))
        resp = self.sendcmd(cmd)
        if (resp[0] == '2'):
            resp = self.getresp()
        if (resp[0] != '1'):
            raise error_reply, resp
    else:
        sock = self.makeport()
        if (rest is not None):
            self.sendcmd(('REST    %s' % rest))
        resp = self.sendcmd(cmd)
        if (resp[0] == '2'):
            resp = self.getresp()
        if (resp[0] != '1'):
            raise error_reply, resp
        (conn, sockaddr) = sock.accept()
        if (self.timeout is not _GLOBAL_DEFAULT_TIMEOUT):
            conn.settimeout(self.timeout)
    if (resp[:3] == '150'):
        size = parse150(resp)
    return (conn, size)
