         task.resume()
     }
     
-    func parseResult (data: NSData) -> (ipList: Array<String>, ttl: Int){
+    private func parseResult (data: NSData) -> (ipList: Array<String>, ttl: Int){
         let str = String(data: data, encoding: NSUTF8StringEncoding)
         let strArray = str!.componentsSeparatedByString(",")
         let ttl = Int(strArray[1])

    
    static let sharedInstance = HTTPDNS()
    
    func getRecordSync(domain: String) -> DNSRecord! {
        let res = self.cache[domain]
        if (res != nil){
            return res!
        } else {
            requsetRecord(domain)
            return nil
        }
    }
    
    func requsetRecord(domain: String) {
        let urlString = self.SERVER_ADDRESS + "d?dn=" + domain + "&ttl=1"
        let url = NSURL(string: urlString)
        

                if (res.ipList.count > 0) {
                    let record = DNSRecord.init(ip: res.ipList[0], ttl: res.ttl, ips: res.ipList)
                    self.cache.updateValue(record, forKey: domain)
                    callback(result: record)
                }
            }
        }
